MCPcopy Index your code
hub / github.com/nodejs/node / exec

Method exec

deps/npm/lib/commands/token.js:51–69  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

49 }
50
51 async exec (args) {
52 if (args.length === 0) {
53 return this.list()
54 }
55 switch (args[0]) {
56 case 'list':
57 case 'ls':
58 return this.list()
59 case 'rm':
60 case 'delete':
61 case 'revoke':
62 case 'remove':
63 return this.rm(args.slice(1))
64 case 'create':
65 return this.create(args.slice(1))
66 default:
67 throw this.usageError(`${args[0]} is not a recognized subcommand.`)
68 }
69 }
70
71 async list () {
72 const json = this.npm.config.get('json')

Callers

nothing calls this directly

Calls 5

listMethod · 0.95
rmMethod · 0.95
createMethod · 0.95
usageErrorMethod · 0.80
sliceMethod · 0.65

Tested by

no test coverage detected