MCPcopy Create free account
hub / github.com/Effect-TS/effect / encodeText

Function encodeText

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

Source from the content-addressed store, hash-verified

8817
8818/** @internal */
8819export const encodeText = <E, R>(self: Stream.Stream<string, E, R>): Stream.Stream<Uint8Array, E, R> =>
8820 suspend(() => {
8821 const encoder = new TextEncoder()
8822 return map(self, (s) => encoder.encode(s))
8823 })
8824
8825/** @internal */
8826export 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