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

Function encodeText

packages/effect/src/internal/stream.ts:8781–8785  ·  view source on GitHub ↗
(self: Stream.Stream<string, E, R>)

Source from the content-addressed store, hash-verified

8779
8780/** @internal */
8781export const encodeText = <E, R>(self: Stream.Stream<string, E, R>): Stream.Stream<Uint8Array, E, R> =>
8782 suspend(() => {
8783 const encoder = new TextEncoder()
8784 return map(self, (s) => encoder.encode(s))
8785 })
8786
8787/** @internal */
8788export const fromEventListener = <A = unknown>(

Callers

nothing calls this directly

Calls 3

encodeMethod · 0.80
suspendFunction · 0.70
mapFunction · 0.50

Tested by

no test coverage detected