Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

sb-promise

steelbrain4MIT1.0.0

A lightweight Promise implementation in NodeJS

promise, es6, async, flow-control

readme

Promise

A lightweight Promise Polyfill for Node and Browsers.

Installation

npm install sb-promise

Example

In case you don't know what Promises are, then this example should give you a basic intro.

function MyFunction(Num){
  return new Promise(function(Resolve, Reject){
    // Do something asyncly
    Resolve(Num * 100);
  });
}
MyFunction(5).then(function(Result){
  console.log(Result); // Outputs 500
});

License

This project is licensed under the terms of MIT License