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

Function makeSource

packages/effect/src/ConfigProvider.ts:367–375  ·  view source on GitHub ↗
(
  get: (path: Path) => Effect.Effect<Node | undefined, SourceError>,
  transform: (path: Path) => Path
)

Source from the content-addressed store, hash-verified

365}
366
367function makeSource(
368 get: (path: Path) => Effect.Effect<Node | undefined, SourceError>,
369 transform: (path: Path) => Path
370): ConfigProvider {
371 return makeProvider(
372 (path) => get(transform(path)),
373 (f) => makeSource(get, flow(transform, f))
374 )
375}
376
377function makeOrElse(first: ConfigProvider, second: ConfigProvider): ConfigProvider {
378 return makeProvider(

Callers 1

makeFunction · 0.70

Calls 3

makeProviderFunction · 0.85
getFunction · 0.70
transformFunction · 0.70

Tested by

no test coverage detected