A minimal and fast promise implementation
lie a small, performant, promise library implementing the Promises/A+ spec Version 1.1.
npm install lie
var Promise = require'lie';
Either use it with browserify (recomended) or grab one of the files from the dist folder
- lie.js/lie.min.js makes 'Promise' available in global scope (or since it's a UMD
Promisewill be availble through a CJS or AMD loader if it's available instead)
- lie.noConflict.js/lie.noConflict.min.js makes 'Lie' availble in global scope, otherwise they the same as lie.js/lie.min.js
- lie.polyfill.js/lie.polyfill.min.js adds 'Promise' to the global scope only if it's not already defined (not a UMD).
Impliments the standard ES6 api,
doSomethingif errrejecterr;elseresolveresult;;then//on success//on errorcatch//short cut for error handling;Promiseall//array of promises or valuesthen;Promiserace//array of promises or values;// either resolve or rejects depending on the first value to do so