MCPcopy Create free account
hub / github.com/TruthHun/BookStack / ReductionPromiseArray

Function ReductionPromiseArray

static/word2md/mammoth.browser.js:8254–8273  ·  view source on GitHub ↗
(promises, fn, initialValue, _each)

Source from the content-addressed store, hash-verified

8252var tryCatch = util.tryCatch;
8253
8254function ReductionPromiseArray(promises, fn, initialValue, _each) {
8255 this.constructor$(promises);
8256 var domain = getDomain();
8257 this._fn = domain === null ? fn : util.domainBind(domain, fn);
8258 if (initialValue !== undefined) {
8259 initialValue = Promise.resolve(initialValue);
8260 initialValue._attachCancellationCallback(this);
8261 }
8262 this._initialValue = initialValue;
8263 this._currentCancellable = null;
8264 if(_each === INTERNAL) {
8265 this._eachValues = Array(this._length);
8266 } else if (_each === 0) {
8267 this._eachValues = null;
8268 } else {
8269 this._eachValues = undefined;
8270 }
8271 this._promise._captureStackTrace();
8272 this._init$(undefined, -5);
8273}
8274util.inherits(ReductionPromiseArray, PromiseArray);
8275
8276ReductionPromiseArray.prototype._gotAccum = function(accum) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected