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

Function tapRight

packages/@contentlayer/utils/src/effect/Stream.ts:37–42  ·  view source on GitHub ↗
(f: (o: A1) => T.Effect<R2, never, unknown>)

Source from the content-addressed store, hash-verified

35
36export const tapRight =
37 <R1, R2, E1, EE1, A1>(f: (o: A1) => T.Effect<R2, never, unknown>) =>
38 (stream: S.Stream<R1, E1, E.Either<EE1, A1>>): S.Stream<R1 & R2, E1, E.Either<EE1, A1>> =>
39 pipe(
40 stream,
41 S.tap((val) => (E.isLeft(val) ? T.succeed(null) : f(val.right))),
42 )
43
44export const tapLeft =
45 <R1, R2, E1, EE1, A1>(f: (e: EE1) => T.Effect<R2, never, 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…