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

Function copyBytes

packages/effect/src/ui/Query.ts:2383–2387  ·  view source on GitHub ↗
(
  buffer: ArrayBufferLike,
  offset: number,
  length: number
)

Source from the content-addressed store, hash-verified

2381const setForEach: (this: unknown, f: (value: unknown) => void) => void = Set.prototype.forEach
2382/** A copy of a buffer's bytes in a new `ArrayBuffer`. A detached buffer throws, skipping the check. */
2383const copyBytes = (
2384 buffer: ArrayBufferLike,
2385 offset: number,
2386 length: number
2387): Uint8Array<ArrayBuffer> => new Uint8Array(buffer, offset, length).slice()
2388
2389/**
2390 * A snapshot of the encoding of a server value, for the `PatchMutated`

Callers 1

materializeFunction · 0.70

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected