MCPcopy Create free account
hub / github.com/dfinity/cancan / encodeArrayBuffer

Function encodeArrayBuffer

src/utils/index.ts:16–17  ·  view source on GitHub ↗
(file: ArrayBuffer)

Source from the content-addressed store, hash-verified

14export const hashtagRegExp = /(?:\s|^)#[A-Za-z0-9\-._]+(?:\s|$)/gim;
15
16export const encodeArrayBuffer = (file: ArrayBuffer): number[] =>
17 Array.from(new Uint8Array(file));
18
19export function unwrap<T>(val: Optional<T>): T | null {
20 if (val[0] === undefined) {

Callers 1

processAndUploadChunkFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected