1.0.0 • Published 8 years ago
sb-promise v1.0.0
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
1.0.0
8 years ago