Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return {
promise: d.promise,
fulfill: d.resolve,
reject: function(reason) {
d.resolve(new Error(reason));
}
};
};
exports.fulfilled = deferred;
exports.rejected = function(reason) {
return deferred(new Error(reason));
};
exports.map = deferred.map;
exports.reduce = deferred.reduce;