Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.