Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teabyii/node-harmony-examples
Some code example for node harmony features
https://github.com/teabyii/node-harmony-examples
Last synced: about 1 month ago
JSON representation
Some code example for node harmony features
- Host: GitHub
- URL: https://github.com/teabyii/node-harmony-examples
- Owner: teabyii
- Created: 2014-06-30T16:27:37.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-11T17:04:26.000Z (over 10 years ago)
- Last Synced: 2023-08-09T16:48:05.739Z (over 1 year ago)
- Language: JavaScript
- Size: 176 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node harmony examples
This give some code examples to introduce node harmony features in version 0.11.13. To list the flags enabling ES6 features in Node, run:
```shell
node --v8-options | grep harmony
```- Block scoping -- block.js
- Iterator and Generator -- generator.js
- Maps and Sets -- maps&sets.js
- Proxy -- proxy.js
- Promise -- promise.js (0.11.13 or later)Run node in harmony using the simple flag `--harmony`, and need `--use-strict` to make up block scoping.
Native promise support in node 0.11.13, or you can take library to help, like: [bluebird](https://github.com/petkaantonov/bluebird), [when](https://github.com/cujojs/when), [q](https://github.com/kriskowal/q), they may give some different features.
## TODO
Keep pace with node version update, provide more examples of new features.