MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / hookFetch

Function hookFetch

scripts/libs/ajax-hook/index.js:78–87  ·  view source on GitHub ↗
({ onBefore, onAfter } = {})

Source from the content-addressed store, hash-verified

76}
77
78export function hookFetch({ onBefore, onAfter } = {}) {
79 if (!readyFetch) {
80 initFetch();
81 readyFetch = true;
82 }
83 return hook([
84 { fn: onBefore, arr: onBeforeFetchFn },
85 { fn: onAfter, arr: onAfterFetchFn },
86 ]);
87}
88
89/* hookFetch example
90hookFetch({

Callers 1

Calls 2

initFetchFunction · 0.85
hookFunction · 0.70

Tested by

no test coverage detected