Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A collection of sweet.js macros that implement ES6 features for ES5

License

NotificationsYou must be signed in to change notification settings

jlongster/es6-macros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a collection ofsweet.js macros thatimplement syntactic ES6 features that can be easily compiled out toES5 JavaScript, which can be used today everywhere.

Warning: This is still in development and most of these features are not completely compliant with ES6 yet. I wouldn't recommend using it for production code yet.

Currently implemented:

  • destructuring (including elision and rest)
  • classes
  • fat arrow functions

TODO:

  • rest and default arguments
  • spread operator for applying arguments
  • possibly limitedfor of support
  • possibly limited module support

Using

$ npm install sweet.js es6-macros

Write your improved ES6 JavaScript, and compile it:

$ sjs -m es6-macros file.js

If you pass-c to sjs along with-o output.js, it will generate asourcemap so you get good debugging too!

Contributing

To run the tests:

npm installmake

About

A collection of sweet.js macros that implement ES6 features for ES5

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp