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

Function encode

packages/effect/src/encoding/Ndjson.ts:137–144  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

135 * @since 4.0.0
136 */
137export const encode = <IE = never, Done = unknown>(): Channel.Channel<
138 Arr.NonEmptyReadonlyArray<Uint8Array>,
139 IE | NdjsonError,
140 Done,
141 Arr.NonEmptyReadonlyArray<unknown>,
142 IE,
143 Done
144> => Channel.map(encodeString(), Arr.map((_) => encoder.encode(_)))
145
146/**
147 * Creates an NDJSON byte encoder channel for values of a schema.

Callers 2

encodeSchemaFunction · 0.70
Ndjson.tsFile · 0.70

Calls 3

encodeMethod · 0.80
encodeStringFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected