MCPcopy Create free account
hub / github.com/contentlayerdev/contentlayer / tapLeft

Function tapLeft

packages/@contentlayer/utils/src/effect/Stream.ts:45–50  ·  view source on GitHub ↗
(f: (e: EE1) => T.Effect<R2, never, unknown>)

Source from the content-addressed store, hash-verified

43
44export const tapLeft =
45 <R1, R2, E1, EE1, A1>(f: (e: EE1) => T.Effect<R2, never, unknown>) =>
46 (stream: S.Stream<R1, E1, E.Either<EE1, A1>>): S.Stream<R1 & R2, E1, E.Either<EE1, A1>> =>
47 pipe(
48 stream,
49 S.tap((val) => (E.isLeft(val) ? f(val.left) : T.succeed(null))),
50 )
51
52export const tapRightEither =
53 <R1, R2, E1, EE1, EE2, A1>(f: (o: A1) => T.Effect<R2, never, E.Either<EE2, unknown>>) =>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…