es6-class-classic
Compiles JavaScript written using ES6 classes to ES4 syntax. For example, this:
{ thisname = name; } { return "Hello " + thisname + "!"; } { super"World"; } { ; } var hw = ;hw;
compiles to this:
var { var { thisname = name; }; Helloprototype { return "Hello " + thisname + "!"; }; return Hello;}; var { var { Hello; }; var {}; HelloWorldPrototypeprototype = Helloprototype; HelloWorldprototype = ; HelloWorldprototypeconstructor = HelloWorld; HelloWorldprototype { ; }; return HelloWorld;}; var hw = ;hw;
Install
$ npm install es6-class-classic
Browserify
Browserify support is built in.
$ npm install es6-class-classic # install local dependency
$ browserify -t es6-class-classic $file
Setup
First, install the development dependencies:
$ npm install
Then, try running the tests:
$ npm test