MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / callArrayProp

Function callArrayProp

packages/shared/src/utils.ts:117–124  ·  view source on GitHub ↗
(object: {[_ in K]?: T[]}, key: K, ...args: Args)

Source from the content-addressed store, hash-verified

115export const isObject = (o: unknown): o is object => typeof o === 'object' && !!o
116
117export function callArrayProp<
118 K extends PropertyKey,
119 T extends (...args: Args) => void,
120 Args extends unknown[],
121>(object: {[_ in K]?: T[]}, key: K, ...args: Args): void {
122 const arr = object[key]
123 if (arr) for (const cb of arr) cb(...args)
124}
125
126export function pushToArrayProp<K extends PropertyKey, T>(
127 object: {[_ in K]?: T[]},

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…