(specifier: string, manifest: NonNullable<ReturnType<typeof getVendorManifest>>)
| 470 | } |
| 471 | |
| 472 | function findVendorPrefix(specifier: string, manifest: NonNullable<ReturnType<typeof getVendorManifest>>): string | null { |
| 473 | const { modules } = manifest; |
| 474 | const keys = Object.keys(modules || {}); |
| 475 | for (const key of keys) { |
| 476 | if (specifier === key || specifier.startsWith(`${key}/`)) { |
| 477 | return key; |
| 478 | } |
| 479 | } |
| 480 | return null; |
| 481 | } |
| 482 | |
| 483 | // ---------------------------------------------------------------------------- |
| 484 | // NativeScript template compile helpers |
no test coverage detected