1.6 KiB
1.6 KiB
6to5 turns ES6+ code into vanilla ES5, so you can use ES6 features today.
- Readable - formatting is retained if possible so your generated code is as similar as possible.
- Extensible - with a large range of plugins and browser support.
- Lossless - source map support so you can debug your compiled code with ease.
- Compact - maps directly to the equivalent ES5 with no runtime*.
Installation
It's as easy as:
$ npm install -g 6to5
Features
- Array comprehension
- Async functions via regenerator
- Arrow functions
- Classes
- Computed property names
- Constants
- Default parameters
- Destructuring
- For-of
- Generators via regenerator
- Generator comprehension
- Let scoping
- Modules
- Numeric literals
- Property method assignment
- Property name shorthand
- React/JSX
- Rest parameters
- Spread
- Template literals
- Unicode regex