MCPcopy Create free account
hub / github.com/MigoXLab/coderio / isPackageInstalled

Function isPackageInstalled

src/utils/dependency-installer.ts:15–22  ·  view source on GitHub ↗
(packageName: string)

Source from the content-addressed store, hash-verified

13}
14
15export function isPackageInstalled(packageName: string): boolean {
16 try {
17 require.resolve(packageName);
18 return true;
19 } catch {
20 return false;
21 }
22}
23
24function formatValidationDependencyHelp(missing: string[]): string {
25 const isWin = process.platform === 'win32';

Callers 2

ensurePackageInstalledFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected