MCPcopy Index your code
hub / github.com/Effect-TS/effect / allResolveInput

Function allResolveInput

packages/effect/src/internal/fiberRuntime.ts:1856–1874  ·  view source on GitHub ↗
(
  input: Iterable<Effect.Effect<any, any, any>> | Record<string, Effect.Effect<any, any, any>>
)

Source from the content-addressed store, hash-verified

1854// === all
1855
1856const allResolveInput = (
1857 input: Iterable<Effect.Effect<any, any, any>> | Record<string, Effect.Effect<any, any, any>>
1858): [Iterable<Effect.Effect<any, any, any>>, Option.Option<(as: ReadonlyArray<any>) => any>] => {
1859 if (Array.isArray(input) || Predicate.isIterable(input)) {
1860 return [input, Option.none()]
1861 }
1862 const keys = Object.keys(input)
1863 const size = keys.length
1864 return [
1865 keys.map((k) => input[k]),
1866 Option.some((values: ReadonlyArray<any>) => {
1867 const res = {}
1868 for (let i = 0; i < size; i++) {
1869 ;(res as any)[keys[i]] = values[i]
1870 }
1871 return res
1872 })
1873 ]
1874}
1875
1876const allValidate = (
1877 effects: Iterable<Effect.Effect<any, any, any>>,

Callers 1

allFunction · 0.85

Calls 2

keysMethod · 0.80
mapMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…