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

Function encode

packages/effect/src/encoding/JsonArray.ts:798–805  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

796 * @since 4.0.6
797 */
798export const encode = <IE = never, Done = unknown>(): Channel.Channel<
799 Arr.NonEmptyReadonlyArray<Uint8Array>,
800 IE | JsonArrayError,
801 Done,
802 Arr.NonEmptyReadonlyArray<unknown>,
803 IE,
804 Done
805> => Channel.map(encodeString(), Arr.map((text) => encoder.encode(text)))
806
807/**
808 * Creates a channel that encodes values with a schema and writes them as the

Callers 1

encodeSchemaFunction · 0.70

Calls 3

encodeMethod · 0.80
encodeStringFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected