MCPcopy Index your code
hub / github.com/Effect-TS/effect / text

Function text

packages/platform-node/src/internal/httpIncomingMessage.ts:35–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33
34 private textEffect: Effect.Effect<string, E> | undefined
35 get text(): Effect.Effect<string, E> {
36 if (this.textEffect) {
37 return this.textEffect
38 }
39 this.textEffect = Effect.runSync(Effect.cached(
40 Effect.flatMap(
41 IncomingMessage.MaxBodySize,
42 (maxBodySize) =>
43 NodeStream.toString(() => this.source, {
44 onFailure: this.onError,
45 maxBytes: Option.getOrUndefined(maxBodySize)
46 })
47 )
48 ))
49 return this.textEffect
50 }
51
52 get unsafeText(): string {
53 return Effect.runSync(this.text)

Callers

nothing calls this directly

Calls 2

cachedMethod · 0.80
toStringMethod · 0.65

Tested by

no test coverage detected