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

Function encode

packages/effect/src/unstable/encoding/Ndjson.ts:97–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95 * @since 4.0.0
96 */
97export const encode = <IE = never, Done = unknown>(): Channel.Channel<
98 Arr.NonEmptyReadonlyArray<Uint8Array>,
99 IE | NdjsonError,
100 Done,
101 Arr.NonEmptyReadonlyArray<unknown>,
102 IE,
103 Done
104> => Channel.map(encodeString(), Arr.map((_) => encoder.encode(_)))
105
106/**
107 * Creates an NDJSON byte encoder channel for values of a schema.

Callers 2

encodeSchemaFunction · 0.70
Ndjson.tsFile · 0.70

Calls 2

encodeStringFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected