reb/babel

v1.0.0 2018-02-28 11:03 UTC

This package is not auto-updated.

Last update: 2025-06-27 11:10:46 UTC


README

It's simple Babel Transpiler for PHP.

PHP Code:

$Babel = new \Babel\Transpiler\Core();
echo $Babel->execute("class REBUS {}");

Result:

"use strict";

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var REBUS = function REBUS() {
  _classCallCheck(this, REBUS);
};