MCPcopy Create free account
hub / github.com/massCodeIO/massCode / selectByIndexes

Function selectByIndexes

src/main/http/import/persist.ts:124–131  ·  view source on GitHub ↗
(items: T[], indexes: number[] | undefined)

Source from the content-addressed store, hash-verified

122}
123
124function selectByIndexes<T>(items: T[], indexes: number[] | undefined): T[] {
125 if (!indexes) {
126 return items
127 }
128
129 const indexSet = new Set(indexes)
130 return items.filter((_, index) => indexSet.has(index))
131}
132
133export function persistHttpImportResult(
134 result: HttpImportResult,

Callers 1

persistHttpImportResultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected