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

Method loadFile

helpers/scanner/scan.ts:233–245  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

231 }
232
233 async loadFile (): Promise<ArrayBuffer | Blob | ScanFileLike> {
234 if ( typeof this.fileLoader !== 'function' ) {
235 return this.fileLoader
236 }
237
238 const file = this.fileLoader()
239
240 if ( file instanceof Promise || isPromiseLike( file ) ) {
241 return await file as ArrayBuffer | Blob | ScanFileLike
242 }
243
244 return file
245 }
246
247 async getZipFileReader ( fileInstance: ArrayBuffer | Blob | ScanFileLike ) {
248 if ( isBlob( fileInstance ) ) {

Callers 1

runScanMethod · 0.95

Calls 1

isPromiseLikeFunction · 0.85

Tested by

no test coverage detected