MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / findVendorPrefix

Function findVendorPrefix

packages/vite/hmr/server/websocket.ts:472–481  ·  view source on GitHub ↗
(specifier: string, manifest: NonNullable<ReturnType<typeof getVendorManifest>>)

Source from the content-addressed store, hash-verified

470}
471
472function 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

Callers 1

Calls 1

keysMethod · 0.65

Tested by

no test coverage detected