MCPcopy
hub / github.com/webpack/tapable / content

Method content

lib/SyncWaterfallHook.js:11–26  ·  view source on GitHub ↗
({ onError, onResult, resultReturns, rethrowIfPossible })

Source from the content-addressed store, hash-verified

9
10class SyncWaterfallHookCodeFactory extends HookCodeFactory {
11 content({ onError, onResult, resultReturns, rethrowIfPossible }) {
12 return this.callTapsSeries({
13 onError: (i, err) => onError(err),
14 onResult: (i, result, next) => {
15 let code = "";
16 code += `if(${result} !== undefined) {\n`;
17 code += `${this._args[0]} = ${result};\n`;
18 code += "}\n";
19 code += next();
20 return code;
21 },
22 onDone: () => onResult(this._args[0]),
23 doneReturns: resultReturns,
24 rethrowIfPossible
25 });
26 }
27}
28
29const factory = new SyncWaterfallHookCodeFactory();

Callers

nothing calls this directly

Calls 2

nextFunction · 0.85
callTapsSeriesMethod · 0.80

Tested by

no test coverage detected