MCPcopy Index your code
hub / github.com/npmx-dev/npmx.dev / isBuiltinCommand

Function isBuiltinCommand

app/utils/install-scripts.ts:68–83  ·  view source on GitHub ↗

* Check if a command is a built-in/common command that isn't an npm package

(name: string)

Source from the content-addressed store, hash-verified

66 * Check if a command is a built-in/common command that isn't an npm package
67 */
68function isBuiltinCommand(name: string): boolean {
69 const builtins = new Set([
70 // Common shell commands that might be mistakenly captured
71 'env',
72 'node',
73 'npm',
74 'yarn',
75 'pnpm',
76 // npx flags that might look like packages
77 'yes',
78 'no',
79 'quiet',
80 'shell',
81 ])
82 return builtins.has(name)
83}
84
85/**
86 * Extract install script information from package.json scripts.

Callers 1

extractNpxDependenciesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected