A PHP to JS transpiler.
composer require noma/js
There's lots to write, but the most basic usage looks like this:
use Noma\Js\Js;
$js = Js::fromString('<?php echo "Hello, World";');
// $js becomes => console.log("Hello, World");
You can also use Js::fromFile
. For more info please refer to the examples for now.