MCPcopy Create free account
hub / github.com/ThatGuySam/doesitarm / toArrayBuffer

Function toArrayBuffer

helpers/scanner/scan.ts:113–122  ·  view source on GitHub ↗
( value: ArrayBuffer | ArrayBufferView )

Source from the content-addressed store, hash-verified

111}
112
113function toArrayBuffer ( value: ArrayBuffer | ArrayBufferView ) {
114 if ( value instanceof ArrayBuffer ) {
115 return value
116 }
117
118 return value.buffer.slice(
119 value.byteOffset,
120 value.byteOffset + value.byteLength
121 )
122}
123
124function isBlob ( value: unknown ): value is Blob {
125 return typeof Blob === 'function' && value instanceof Blob

Callers 1

getZipFileReaderMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected