Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. ES6 Tools
  3. Lebab

Lebab

MITJavaScriptv3.2.7

Transpiles ES5 JavaScript to modern ES6/ES7 syntax, performing the opposite transformation of Babel.

Visit WebsiteGitHubGitHub
5.6k stars151 forks0 contributors

What is Lebab?

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.

Target Audience

JavaScript developers maintaining legacy codebases who want to modernize their ES5 code to ES6/ES7 syntax without manual refactoring.

Value Proposition

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.

Overview

Turn your ES5 code into readable ES6. Lebab does the opposite of what Babel does.

Use Cases

Best For

  • Upgrading legacy JavaScript projects to modern ES6+ syntax
  • Automating repetitive refactoring tasks like converting var to let/const
  • Transforming prototype-based inheritance to ES6 classes
  • Converting CommonJS modules to ES6 modules
  • Applying safe syntax transformations like arrow functions and template strings
  • Modernizing codebases incrementally with targeted transforms

Not Ideal For

  • Projects requiring 100% reliable, unattended code transformations due to unsafe transforms with known bugs
  • Codebases heavily reliant on dynamic JavaScript patterns like complex closures or advanced scoping, where heuristics may fail
  • Teams seeking a one-click solution to upgrade entire codebases, as Lebab necessitates incremental, transform-by-transform application with manual review
  • Modern projects already using ES6+ or TypeScript, where Lebab's transformations are unnecessary or redundant

Pros & Cons

Pros

Targeted Syntax Upgrades

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.

Incremental Modernization

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.

Safety Transparency

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.

Editor Integration

With plugins for popular editors like VSCode, Atom, and Sublime, Lebab integrates seamlessly into development workflows, facilitating on-the-fly code transformations.

Cons

Bug-Prone Unsafe Transforms

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.

Complex Dependency Chains

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.

Limited Pattern Coverage

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.

Frequently Asked Questions

Quick Stats

Stars5,635
Forks151
Contributors0
Open Issues36
Last commit2 months ago
CreatedSince 2015

Tags

#compiler#transpiler#cli-tool#ast-transformation#nodejs#es6#javascript#refactoring-tool#es2015

Built With

N
Node.js
n
npm

Links & Resources

Website

Included in

ES6 Tools4.0k
Auto-fetched 22 hours ago

Related Projects

BabelBabel

🐠 Babel is a compiler for writing next generation JavaScript.

Stars43,955
Forks5,825
Last commit4 days ago
Traceur compilerTraceur compiler

Traceur is a JavaScript.next-to-JavaScript-of-today compiler

Stars8,133
Forks569
Last commit1 year ago
regeneratorregenerator

Source transformer enabling ECMAScript 6 generator functions in JavaScript-of-today.

Stars3,829
Forks1,137
Last commit2 years ago
babelifybabelify

Browserify transform for Babel

Stars1,677
Forks112
Last commit4 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub