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

Function promisified

static/word2md/mammoth.browser.js:7894–7909  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7892 callback = fn;
7893 }
7894 function promisified() {
7895 var _receiver = receiver;
7896 if (receiver === THIS) _receiver = this;
7897 var promise = new Promise(INTERNAL);
7898 promise._captureStackTrace();
7899 var cb = typeof method === "string" && this !== defaultThis
7900 ? this[method] : callback;
7901 var fn = nodebackForPromise(promise, multiArgs);
7902 try {
7903 cb.apply(_receiver, withAppended(arguments, fn));
7904 } catch(e) {
7905 promise._rejectCallback(maybeWrapAsError(e), true, true);
7906 }
7907 if (!promise._isFateSealed()) promise._setAsyncGuaranteed();
7908 return promise;
7909 }
7910 util.notEnumerableProp(promisified, "__isPromisified__", true);
7911 return promisified;
7912}

Callers

nothing calls this directly

Calls 3

nodebackForPromiseFunction · 0.70
withAppendedFunction · 0.70
maybeWrapAsErrorFunction · 0.70

Tested by

no test coverage detected