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

Function byteSplits

packages/effect/test/encoding/Xml.test.ts:57–61  ·  view source on GitHub ↗
(bytes: Uint8Array)

Source from the content-addressed store, hash-verified

55}
56
57const byteSplits = (bytes: Uint8Array): Array<Array<Uint8Array>> => {
58 const out: Array<Array<Uint8Array>> = [Array.from(bytes, (byte) => Uint8Array.of(byte))]
59 for (let i = 0; i <= bytes.length; i++) out.push([bytes.subarray(0, i), bytes.subarray(i)])
60 return out
61}
62
63describe("Xml", () => {
64 it("identifies Xml errors", () => {

Callers 1

Xml.test.tsFile · 0.85

Calls 3

fromMethod · 0.80
ofMethod · 0.65
pushMethod · 0.65

Tested by

no test coverage detected