MCPcopy Create free account
hub / github.com/npm/cli / cmd

Method cmd

lib/npm.js:21–30  ·  view source on GitHub ↗
(c)

Source from the content-addressed store, hash-verified

19 }
20
21 static cmd (c) {
22 const command = deref(c)
23 if (!command) {
24 throw Object.assign(new Error(`Unknown command ${c}`), {
25 code: 'EUNKNOWNCOMMAND',
26 command: c,
27 })
28 }
29 return require(`./commands/${command}`)
30 }
31
32 unrefPromises = []
33 updateNotification = null

Callers 9

#execMethod · 0.80
cmdUsagesFunction · 0.80
didYouMeanFunction · 0.80
execMethod · 0.80
getCustomDefinitionsFunction · 0.80
completionMethod · 0.80
completionMethod · 0.80
npm.jsFile · 0.80
setupMockNpmFunction · 0.80

Calls 1

derefFunction · 0.85

Tested by

no test coverage detected