MCPcopy Create free account
hub / github.com/Snowflyt/tinyeffect / withLog

Function withLog

test/README.example.proof.ts:945–949  ·  view source on GitHub ↗
(message: string)

Source from the content-addressed store, hash-verified

943
944 const withLog =
945 (message: string) =>
946 <E extends Effect, R>(self: Effected<E, R>): Effected<E, R> =>
947 self.tap((value) => {
948 console.log(`${message}: ${String(value)}`);
949 });
950
951 expect(Effected.of(42).pipe(delay(100))).to(equal<Effected<Sleep, number>>);
952

Callers 1

Calls 1

tapMethod · 0.65

Tested by

no test coverage detected