MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / hasDependency

Function hasDependency

packages/vite/helpers/utils.ts:73–75  ·  view source on GitHub ↗
(packageName: string)

Source from the content-addressed store, hash-verified

71 * Check if a dependency is present in package.json
72 */
73export function hasDependency(packageName: string): boolean {
74 return getAllDependencies().includes(packageName);
75}
76
77/**
78 * Utility to get the path (usually nested in node_modules) of a dependency.

Callers

nothing calls this directly

Calls 2

includesMethod · 0.80
getAllDependenciesFunction · 0.70

Tested by

no test coverage detected