Transpiles ES5 JavaScript to modern ES6/ES7 syntax, performing the opposite transformation of Babel.
Lebab is a JavaScript transpiler that automatically converts ES5 code into modern ES6/ES7 syntax. It performs the inverse of Babel, helping developers upgrade legacy codebases by applying transformations like arrow functions, classes, and template strings to improve readability and maintainability.
JavaScript developers maintaining legacy codebases who want to modernize their ES5 code to ES6/ES7 syntax without manual refactoring.
Lebab provides a focused, automated solution for code modernization with a clear distinction between safe and unsafe transformations, giving developers control and transparency during the upgrade process.
Turn your ES5 code into readable ES6. Lebab does the opposite of what Babel does.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Lebab provides specific, well-documented transforms for common ES5 to ES6 conversions, such as arrow functions and classes, with clear rules on applicability and limitations.
The tool allows applying one transform at a time, enabling gradual codebase upgrades and reducing risk, as emphasized in the README's recommendation to inspect diffs carefully.
It clearly distinguishes between safe and unsafe transforms, listing known bugs and limitations for each, helping developers assess and mitigate risks during the upgrade process.
With plugins for popular editors like VSCode, Atom, and Sublime, Lebab integrates seamlessly into development workflows, facilitating on-the-fly code transformations.
Transforms like 'let' and 'class' have documented bugs, such as issues with destructuring or closure over loop variables, which can introduce errors and require manual fixes.
Many transforms depend on others being applied first—e.g., for-of requires let/const—creating a tedious, multi-step process that complicates automation and increases the chance of misordering.
Not all JavaScript patterns are supported; for instance, arg-rest doesn't transform functions with formal parameters, and commonjs ignores imports/exports in nested blocks, leaving gaps in modernization.