({ onBefore, onAfter } = {})
| 76 | } |
| 77 | |
| 78 | export 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 |
| 90 | hookFetch({ |
no test coverage detected