Download frontend/node_modules/tapable/lib/MultiHook.js from netzkontrast/rag-context-optimizer: direct link, hf CLI and curl.
- Browser
- Download file 873 Bytes
-
https://huggingface.co/spaces/netzkontrast/rag-context-optimizer/resolve/main/frontend/node_modules/tapable/lib/MultiHook.js
- Command line
-
hf download hf://spaces/netzkontrast/rag-context-optimizer/frontend/node_modules/tapable/lib/MultiHook.js
-
curl -L -o MultiHook.js https://huggingface.co/spaces/netzkontrast/rag-context-optimizer/resolve/main/frontend/node_modules/tapable/lib/MultiHook.js
873 Bytes
| /* | |
| MIT License http://www.opensource.org/licenses/mit-license.php | |
| Author Tobias Koppers @sokra | |
| */ | |
| ; | |
| class MultiHook { | |
| constructor(hooks, name = undefined) { | |
| this.hooks = hooks; | |
| this.name = name; | |
| } | |
| tap(options, fn) { | |
| for (const hook of this.hooks) { | |
| hook.tap(options, fn); | |
| } | |
| } | |
| tapAsync(options, fn) { | |
| for (const hook of this.hooks) { | |
| hook.tapAsync(options, fn); | |
| } | |
| } | |
| tapPromise(options, fn) { | |
| for (const hook of this.hooks) { | |
| hook.tapPromise(options, fn); | |
| } | |
| } | |
| isUsed() { | |
| for (const hook of this.hooks) { | |
| if (hook.isUsed()) return true; | |
| } | |
| return false; | |
| } | |
| intercept(interceptor) { | |
| for (const hook of this.hooks) { | |
| hook.intercept(interceptor); | |
| } | |
| } | |
| withOptions(options) { | |
| return new MultiHook( | |
| this.hooks.map((hook) => hook.withOptions(options)), | |
| this.name | |
| ); | |
| } | |
| } | |
| module.exports = MultiHook; | |