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

Function dispose

static/word2md/mammoth.browser.js:8989–9014  ·  view source on GitHub ↗
(resources, inspection)

Source from the content-addressed store, hash-verified

8987 return maybePromise;
8988 }
8989 function dispose(resources, inspection) {
8990 var i = 0;
8991 var len = resources.length;
8992 var ret = new Promise(INTERNAL);
8993 function iterator() {
8994 if (i >= len) return ret._fulfill();
8995 var maybePromise = castPreservingDisposable(resources[i++]);
8996 if (maybePromise instanceof Promise &&
8997 maybePromise._isDisposable()) {
8998 try {
8999 maybePromise = tryConvertToPromise(
9000 maybePromise._getDisposer().tryDispose(inspection),
9001 resources.promise);
9002 } catch (e) {
9003 return thrower(e);
9004 }
9005 if (maybePromise instanceof Promise) {
9006 return maybePromise._then(iterator, thrower,
9007 null, null, null);
9008 }
9009 }
9010 iterator();
9011 }
9012 iterator();
9013 return ret;
9014 }
9015
9016 function Disposer(data, promise, context) {
9017 this._data = data;

Callers 1

mammoth.browser.jsFile · 0.70

Calls 1

iteratorFunction · 0.70

Tested by

no test coverage detected