How to use the deferred.reduce function in deferred

To help you get started, we’ve selected a few deferred examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cujojs / promise-perf-tests / lib / adapters / deferred.js View on Github external
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;

deferred

Modular and fast Promises implementation

ISC
Latest version published 5 years ago

Package Health Score

65 / 100
Full package analysis