MCPcopy
hub / github.com/vercel-labs/just-bash / bytesFromUint8Array

Function bytesFromUint8Array

packages/just-bash/src/encoding.ts:102–106  ·  view source on GitHub ↗
(buf: Uint8Array)

Source from the content-addressed store, hash-verified

100 * The reverse is `Uint8Array.from(latin1FromBytes(b), (c) => c.charCodeAt(0))`.
101 */
102export function bytesFromUint8Array(buf: Uint8Array): ByteString {
103 let out = "";
104 for (let i = 0; i < buf.length; i++) out += String.fromCharCode(buf[i]);
105 return out as unknown as ByteString;
106}
107
108/**
109 * Read a file's raw bytes from any `IFileSystem`. Prefers the optional

Callers 2

readBytesFromFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…