MCPcopy
hub / github.com/cujojs/when / rejectChainSparse

Function rejectChainSparse

benchmark/promise.js:146–157  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

144 }
145
146 function rejectChainSparse(n) {
147 return function(deferred) {
148 var p = Promise.reject({}), i = 1;
149 for(;i < n; i++) {
150 p = p.then(null, rethrow);
151 }
152
153 p.then(null, identity).then(function() {
154 deferred.resolve();
155 });
156 };
157 }
158
159 //
160 // Promise helpers

Callers 1

promise.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…