MCPcopy
hub / github.com/remotely-save/remotely-save / bufferToArrayBuffer

Function bufferToArrayBuffer

src/misc.ts:90–94  ·  view source on GitHub ↗
(
  b: Buffer | Uint8Array | ArrayBufferView
)

Source from the content-addressed store, hash-verified

88 * @returns ArrayBuffer
89 */
90export const bufferToArrayBuffer = (
91 b: Buffer | Uint8Array | ArrayBufferView
92) => {
93 return b.buffer.slice(b.byteOffset, b.byteOffset + b.byteLength);
94};
95
96/**
97 * Simple func.

Callers 14

_readFileFromRootMethod · 0.90
handleMethod · 0.90
_readFileFromRootMethod · 0.90
encryptArrayBufferFunction · 0.90
encryptStringToBase32Function · 0.90
decryptBase32ToStringFunction · 0.90
encryptStringToBase64urlFunction · 0.90
decryptBase64urlToStringFunction · 0.90
_putUint8ArrayByRangeMethod · 0.90
_putUint8ArrayByRangeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected