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

Function makeSource

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

Source from the content-addressed store, hash-verified

375}
376
377function makeSource(
378 get: (path: Path) => Effect.Effect<Node | undefined, SourceError>,
379 transform: (path: Path) => Path
380): ConfigProvider {
381 return makeProvider(
382 (path) => get(transform(path)),
383 (f) => makeSource(get, (path) => f(transform(path)))
384 )
385}
386
387function makeOrElse(first: ConfigProvider, second: ConfigProvider): ConfigProvider {
388 return makeProvider(

Callers 1

makeFunction · 0.70

Calls 4

makeProviderFunction · 0.85
getFunction · 0.70
transformFunction · 0.70
fFunction · 0.50

Tested by

no test coverage detected