Function
addFileDep
(
url: string,
runtime: boolean = false,
)
Source from the content-addressed store, hash-verified
| 357 | |
| 358 | const fileDeps: FileDep[] = [] |
| 359 | const addFileDep = ( |
| 360 | url: string, |
| 361 | runtime: boolean = false, |
| 362 | ): number => { |
| 363 | const index = fileDeps.findIndex((dep) => dep.url === url) |
| 364 | if (index === -1) { |
| 365 | return fileDeps.push({ url, runtime }) - 1 |
| 366 | } else { |
| 367 | return index |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | if (imports.length) { |
| 372 | for (let index = 0; index < imports.length; index++) { |
Tested by
no test coverage detected