(list, hook)
| 80 | } |
| 81 | |
| 82 | function stop(list, hook) { |
| 83 | const index = ArrayPrototypeIndexOf(list, hook); |
| 84 | if (index >= 0) { |
| 85 | ArrayPrototypeSplice(list, index, 1); |
| 86 | update(); |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | function makeUseHook(name) { |
| 91 | const list = hooks[name]; |