MCPcopy
hub / github.com/npmx-dev/npmx.dev / useDependencyAnalysis

Function useDependencyAnalysis

app/composables/useDependencyAnalysis.ts:6–14  ·  view source on GitHub ↗
(
  packageName: MaybeRefOrGetter<string>,
  version: MaybeRefOrGetter<string>,
)

Source from the content-addressed store, hash-verified

4 * Before: useVulnerabilityTree - but now we use this for both vulnerabilities and deprecated packages.
5 */
6export function useDependencyAnalysis(
7 packageName: MaybeRefOrGetter<string>,
8 version: MaybeRefOrGetter<string>,
9) {
10 return useFetch(
11 () =>
12 `/api/registry/vulnerabilities/${encodePackageName(toValue(packageName))}/v/${toValue(version)}`,
13 )
14}

Callers

nothing calls this directly

Calls 1

encodePackageNameFunction · 0.50

Tested by

no test coverage detected