MCPcopy Create free account
hub / github.com/Effect-TS/effect / indicesFrom

Function indicesFrom

packages/effect/src/internal/configProvider.ts:649–658  ·  view source on GitHub ↗
(quotedIndices: HashSet.HashSet<string>)

Source from the content-addressed store, hash-verified

647}
648
649const indicesFrom = (quotedIndices: HashSet.HashSet<string>): Effect.Effect<Array<number>> =>
650 pipe(
651 core.forEachSequential(quotedIndices, parseQuotedIndex),
652 core.mapBoth({
653 onFailure: () => Arr.empty<number>(),
654 onSuccess: Arr.sort(number.Order)
655 }),
656 core.either,
657 core.map(Either.merge)
658 )
659
660const STR_INDEX_REGEX = /(^.+)(\[(\d+)\])$/
661const QUOTED_INDEX_REGEX = /^(\[(\d+)\])$/

Callers

nothing calls this directly

Calls 2

pipeFunction · 0.70
mapMethod · 0.65

Tested by

no test coverage detected