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

Function decode

packages/effect/src/unstable/encoding/Ndjson.ts:209–220  ·  view source on GitHub ↗
(options?: {
  readonly ignoreEmptyLines?: boolean | undefined
})

Source from the content-addressed store, hash-verified

207 * @since 4.0.0
208 */
209export const decode = <IE = never, Done = unknown>(options?: {
210 readonly ignoreEmptyLines?: boolean | undefined
211}): Channel.Channel<
212 Arr.NonEmptyReadonlyArray<unknown>,
213 IE | NdjsonError,
214 Done,
215 Arr.NonEmptyReadonlyArray<Uint8Array>,
216 IE,
217 Done
218> => {
219 return Channel.pipeTo(Channel.decodeText(), decodeString(options))
220}
221
222/**
223 * Creates an NDJSON byte decoder channel for values of a schema.

Callers 2

decodeSchemaFunction · 0.70
Ndjson.tsFile · 0.70

Calls 1

decodeStringFunction · 0.85

Tested by

no test coverage detected