https://github.com/pitou/bluebird-promise-examples
Learning how to work with Promises using Bluebird
https://github.com/pitou/bluebird-promise-examples
Last synced: 12 months ago
JSON representation
Learning how to work with Promises using Bluebird
- Host: GitHub
- URL: https://github.com/pitou/bluebird-promise-examples
- Owner: pitou
- Created: 2015-07-11T13:08:50.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-07-12T12:58:45.000Z (almost 11 years ago)
- Last Synced: 2025-06-02T04:43:18.905Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 117 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## bluebird-promise-examples
A bunch of examples that show common cases of asyncronous function execution using the [bluebird](https://github.com/petkaantonov/bluebird) promise library.
All the examples are written using the ES6 syntax.
### Get started
```
npm install
```
This will install of course bluebird, [traceur](https://github.com/google/traceur-compiler/wiki/Getting-Started) and [nodeunit](https://github.com/caolan/nodeunit) to launch test for the examples.
### Usage
To see an example in action just launch:
```
node src/run.js example/path/you/want/to/run
```
e.g.
```
node src/run.js src/Map/PromisifyFunctionExample.js
```
### Examples
This is the list of the examples I've written so far:
* **Map/NoAsync**
* **Map/PromisifyFunction**
* **Map/PromisifyObjectFunctions**
* **Collection/All**
* **Collection/Props**
### Todo
* Add some explanation on the examples
* Accept custom input data from the terminal
### Tests
Run tests on the examples with:
```
nodeunit test/nodeunit/test_examples.js
```