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

Function withLog

test/README.example.spec.ts:1522–1526  ·  view source on GitHub ↗
(message: string)

Source from the content-addressed store, hash-verified

1520
1521 const withLog =
1522 (message: string) =>
1523 <E extends Effect, R>(self: Effected<E, R>): Effected<E, R> =>
1524 self.tap((value) => {
1525 console.log(`${message}: ${String(value)}`);
1526 });
1527
1528 expect(await Effected.of(42).pipe(delay(100)).runAsync()).toBe(42);
1529

Callers 1

Calls 1

tapMethod · 0.65

Tested by

no test coverage detected