MCPcopy Create free account
hub / github.com/EsperoTech/yaade / modifyCollection

Function modifyCollection

client/src/state/collections.tsx:176–180  ·  view source on GitHub ↗
(state: Collection[], id: number, f: (c: Collection) => void)

Source from the content-addressed store, hash-verified

174}
175
176function modifyCollection(state: Collection[], id: number, f: (c: Collection) => void) {
177 const s = JSON.parse(JSON.stringify(state));
178 mod(s, id, f);
179 return s;
180}
181
182function mod(collections: Collection[], id: number, f: (c: Collection) => void) {
183 for (let i = 0; i < collections.length; i++) {

Callers 15

addCollectionFunction · 0.85
patchCollectionDataFunction · 0.85
deleteCollectionFunction · 0.85
addRequestFunction · 0.85
patchRequestDataFunction · 0.85
deleteRequestFunction · 0.85
moveRequestFunction · 0.85
toggleOpenCollectionFunction · 0.85
setEnvVarFunction · 0.85

Calls 1

modFunction · 0.70

Tested by

no test coverage detected