MCPcopy
hub / github.com/markmap/markmap / tap

Method tap

packages/markmap-common/src/hook.ts:6–9  ·  view source on GitHub ↗
(fn: HookCallback<T>)

Source from the content-addressed store, hash-verified

4 protected listeners: Array<HookCallback<T>> = [];
5
6 tap(fn: HookCallback<T>): () => void {
7 this.listeners.push(fn);
8 return () => this.revoke(fn);
9 }
10
11 revoke(fn: HookCallback<T>): void {
12 const i = this.listeners.indexOf(fn);

Callers 13

transformFunction · 0.80
transformFunction · 0.80
transformFunction · 0.80
transformFunction · 0.80
transformFunction · 0.80
transformFunction · 0.80
transformFunction · 0.80
transformFunction · 0.80
transformFunction · 0.80
transformFunction · 0.80
transformFunction · 0.80
constructorMethod · 0.80

Calls 1

revokeMethod · 0.95

Tested by 1

transformFunction · 0.64