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

Function loopArray

packages/effect/src/internal/configProvider.ts:799–806  ·  view source on GitHub ↗
(
    path: ReadonlyArray<KeyComponent>,
    values: JsonArray
  )

Source from the content-addressed store, hash-verified

797 return Arr.empty<[ReadonlyArray<KeyComponent>, string]>()
798 }
799 const loopArray = (
800 path: ReadonlyArray<KeyComponent>,
801 values: JsonArray
802 ): ReadonlyArray<[path: ReadonlyArray<KeyComponent>, value: string]> =>
803 Arr.match(values, {
804 onEmpty: () => Arr.make([path, "<nil>"] as [ReadonlyArray<KeyComponent>, string]),
805 onNonEmpty: Arr.flatMap((value, index) => loopAny(Arr.append(path, keyIndex(index)), value))
806 })
807 const loopObject = (
808 path: ReadonlyArray<KeyComponent>,
809 value: JsonMap

Callers 1

loopAnyFunction · 0.85

Calls 3

loopAnyFunction · 0.85
keyIndexFunction · 0.85
makeMethod · 0.65

Tested by

no test coverage detected