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

Function findCollection

client/src/state/collections.tsx:133–144  ·  view source on GitHub ↗
(collections: Collection[], id: number)

Source from the content-addressed store, hash-verified

131};
132
133function findCollection(collections: Collection[], id: number): Collection | undefined {
134 for (const collection of collections) {
135 if (collection.id === id) {
136 return collection;
137 }
138 if (collection.children) {
139 const res = findCollection(collection.children, id);
140 if (res) return res;
141 }
142 }
143 return undefined;
144}
145
146function findRequest(collections: Collection[], id: number): Request | undefined {
147 for (const collection of collections) {

Callers 15

CollectionPanelFunction · 0.90
WebsocketHandlerFunction · 0.90
getEnvFunction · 0.90
handleConnectFunction · 0.90
ScriptPanelFunction · 0.90
getEnvFunction · 0.90
RequestSenderFunction · 0.90
sendRequestFunction · 0.90
sendRequestToExtensionFunction · 0.90
saveOnSendFunction · 0.90
sendRequestToServerFunction · 0.90
getParentTreeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected