MCPcopy Create free account
hub / github.com/sindresorhus/execa / bufferToUint8Array

Function bufferToUint8Array

lib/utils/uint-array.js:10–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8export const isUint8Array = value => objectToString.call(value) === '[object Uint8Array]';
9
10export const bufferToUint8Array = buffer => new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
11
12const textEncoder = new TextEncoder();
13const stringToUint8Array = string => textEncoder.encode(string);

Callers 4

getTargetFdFunction · 0.90
handle-sync.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected