JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 33751
  • Score
    100M100P100Q139995F
  • License MIT

laravel2js and js2laravel converter laravel php resource utils

Package Exports

  • laravelphp
  • laravelphp/js2laravel
  • laravelphp/laravel2js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (laravelphp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

travis npm

Download

The source is available for download from GitHub. Alternatively, you can install using npm:

npm install --save laravelphp

You can then require() laravel as normal:

const laravelphp = require('laravelphp');

Or you can direclty require() its functions:

const laravel2js = require('laravelphp/laravel2js');

Usage

const php = `<?php
  return [
    'key1' => 'Hello',
    'key2' => 'An application to manipulate and process laravel php language files',
    'key.nested' => 'laravel Data Manager'
  ];
?>`;

const js = {
  "key1": "Hello",
  "key2": "An application to manipulate and process laravel php language files",
  "key.nested": "laravel Data Manager"
};


const laravel2js = require('laravelphp/laravel2js');
laravel2js(php, (err, res) => {
  // res is like js
});

const js2laravel = require('laravelphp/js2laravel');
js2laravel(js, (err, res) => {
  // res is like php
});