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

Function encode

packages/effect/src/encoding/Xml.ts:807–815  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

805 * @since 4.0.6
806 */
807export const encode = <IE = never, Done = unknown>(): Channel.Channel<
808 Arr.NonEmptyReadonlyArray<Uint8Array>,
809 XmlError | IE,
810 Done,
811 Arr.NonEmptyReadonlyArray<Event>,
812 IE,
813 Done
814> =>
815 Channel.map(makeChannel<Event, string, IE, Done>(() => new Writer(true)), Arr.map((text) => textEncoder.encode(text)))
816
817/**
818 * Converts an element tree back into events.

Callers

nothing calls this directly

Calls 3

encodeMethod · 0.80
makeChannelFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected