Deferred the ES2015 way.
Deprecation notice: Polyfill will be removed in due time. Versions of node.js without the required features will not be supported.
var Deferred = require('es6-deferred');
var d = new Deferred();
The promise.
Resolves the promise with the given value.
Rejects the promise with the given error.
Appends a fulfillment and rejection handler to the promise.
Appends a rejection handler to the promise.
MIT