sb-promise

1.0.0 • Public • Published

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

/sb-promise/

    Package Sidebar

    Install

    npm i sb-promise

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • steelbrain