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

Function spreadAdapter

static/word2md/mammoth.browser.js:6665–6673  ·  view source on GitHub ↗
(val, nodeback)

Source from the content-addressed store, hash-verified

6663var errorObj = util.errorObj;
6664
6665function spreadAdapter(val, nodeback) {
6666 var promise = this;
6667 if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);
6668 var ret =
6669 tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val));
6670 if (ret === errorObj) {
6671 async.throwLater(ret.e);
6672 }
6673}
6674
6675function successAdapter(val, nodeback) {
6676 var promise = this;

Callers

nothing calls this directly

Calls 1

tryCatchFunction · 0.70

Tested by

no test coverage detected