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

Method content

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

Source from the content-addressed store, hash-verified

9
10class SyncBailHookCodeFactory extends HookCodeFactory {
11 content({ onError, onResult, resultReturns, onDone, rethrowIfPossible }) {
12 return this.callTapsSeries({
13 onError: (i, err) => onError(err),
14 onResult: (i, result, next) =>
15 `if(${result} !== undefined) {\n${onResult(
16 result
17 )};\n} else {\n${next()}}\n`,
18 resultReturns,
19 onDone,
20 rethrowIfPossible
21 });
22 }
23}
24
25const factory = new SyncBailHookCodeFactory();

Callers

nothing calls this directly

Calls 2

nextFunction · 0.85
callTapsSeriesMethod · 0.80

Tested by

no test coverage detected