Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mping/5to6
Converts es5 to es6, using simple and safe transforms
https://github.com/mping/5to6
Last synced: 3 months ago
JSON representation
Converts es5 to es6, using simple and safe transforms
- Host: GitHub
- URL: https://github.com/mping/5to6
- Owner: mping
- Created: 2015-02-25T17:37:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-03-16T11:13:11.000Z (over 9 years ago)
- Last Synced: 2024-05-13T22:55:14.247Z (6 months ago)
- Language: JavaScript
- Size: 168 KB
- Stars: 16
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 5to6
Convert your es5 code to es6, using basic transforms.
Right now what happens is that simple anonymous functions are converted to arrow syntax.```
function(a,b,c) {
a = b + c;
return a + 2;
}
```gets converted to
```
(a,b,c) => {a = b + c; return a + 2;}
```## Using
Just call ```node index.js ``` to transpile to sysout
```
> node index.js test.js
```alternatively, write directly to same infile
```
> cat test.js | node index.js | tee test.js```
## TODO
- [ ] allow flexible configuration
- [ ] add more visitors
- [x] parens free arrows
- [ ] const
- [ ] let
- [ ] default argument values
- ...