MCPcopy Create free account
hub / github.com/dfinity/orbit / toArrayBuffer

Function toArrayBuffer

apps/wallet/src/utils/helper.utils.ts:315–317  ·  view source on GitHub ↗
(input: Uint8Array | number[])

Source from the content-addressed store, hash-verified

313};
314
315export const toArrayBuffer = (input: Uint8Array | number[]): ArrayBuffer => {
316 return input instanceof Uint8Array ? input.buffer : new Uint8Array(input).buffer;
317};
318
319export const toUint8Array = (input: ArrayBuffer | number[] | Uint8Array): Uint8Array => {
320 if (input instanceof Uint8Array) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected