Lebab
Lebab transpiles your ES5 code to ES2015.
It does exactly the opposite of what Babel does.
If you want to understand what Lebab exactly does, try the live demo.
Usage
Install it using npm:
$ npm install -g lebab
Convert your old-fashioned code using the lebab
cli tool,
enabling a specific transformation:
$ lebab es5.js -o es6.js --enable let
Features and known limitations
The recommended way of using Lebab is to apply one transform at a time,
read what exactly the transform does and what are its limitations,
apply it for your code and inspect the diff carefully.
Safe transforms
These transforms can be applied with relatively high confidence.
They use pretty straight-forward and strict rules for changing the code.
The resulting ES2015 code should be almost 100% equivalent of the original code.
Unsafe transforms
These transforms should be applied with caution.
They use heuristics to detect common patterns that can be expressed with ES2015 syntax.
There are no guarantees that the resulting code is equivalent of the original code.
What's next?
Which feature should Lebab implement next?
Let us know by creating an issue
or voicing your opinion in existing one.
Want to contribute? Read how Lebab looks for patterns in syntax trees.