MCPcopy Index your code
hub / github.com/tinyplex/tinybase / reduceCallbacks

Function reduceCallbacks

src/middleware/index.ts:39–49  ·  view source on GitHub ↗
(
  callbacks: ((...args: any[]) => any)[],
  thing: any,
  ...ids: Id[]
)

Source from the content-addressed store, hash-verified

37import {ProtectedStore} from '../store/index.ts';
38
39const reduceCallbacks = (
40 callbacks: ((...args: any[]) => any)[],
41 thing: any,
42 ...ids: Id[]
43): any =>
44 arrayReduce(
45 callbacks,
46 (current, callback) =>
47 isUndefined(current) ? current : callback(...ids, current),
48 thing,
49 );
50
51const everyCallback = (
52 callbacks: ((...args: any[]) => boolean)[],

Callers 8

willSetContentFunction · 0.70
willSetTablesFunction · 0.70
willSetTableFunction · 0.70
willSetRowFunction · 0.70
willSetCellFunction · 0.70
willSetValuesFunction · 0.70
willSetValueFunction · 0.70
willApplyChangesFunction · 0.70

Calls 2

arrayReduceFunction · 0.90
isUndefinedFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…