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

Function makeNodeFileBuffer

helpers/scanner/scan.ts:103–111  ·  view source on GitHub ↗
( buffer: Uint8Array )

Source from the content-addressed store, hash-verified

101}
102
103function makeNodeFileBuffer ( buffer: Uint8Array ) {
104 const fileBuffer = Buffer.alloc( buffer.byteLength )
105
106 for ( let index = 0; index < buffer.length; index += 1 ) {
107 fileBuffer[ index ] = buffer[ index ]
108 }
109
110 return fileBuffer
111}
112
113function toArrayBuffer ( value: ArrayBuffer | ArrayBufferView ) {
114 if ( value instanceof ArrayBuffer ) {

Callers 1

AppScanClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected