ES6 Promise based on ThenFail v0.4.
GitHub https://github.com/vilic/ruff-promise
rap install promise
By requiring this module, it will try to attach Promise
constructor to global
if it's not present.
require('promise');
var promise = new Promise(function (resolve) {
setTimeout(function () {
resolve('Hello, Ruff!');
});
});
promise.then(function (message) {
console.log(message);
});
MIT License.