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

Method usageMessage

deps/npm/lib/commands/fund.js:25–35  ·  view source on GitHub ↗
(paramsObj = {})

Source from the content-addressed store, hash-verified

23
24 // XXX: maybe worth making this generic for all commands?
25 usageMessage (paramsObj = {}) {
26 let msg = `\`npm ${this.constructor.name}`
27 const params = Object.entries(paramsObj)
28 if (params.length) {
29 msg += ` ${this.constructor.usage}`
30 }
31 for (const [key, value] of params) {
32 msg += ` --${key}=${value}`
33 }
34 return `${msg}\``
35 }
36
37 static async completion (opts, npm) {
38 const completion = require('../utils/installed-deep.js')

Callers 2

execMethod · 0.95
openFundingUrlMethod · 0.95

Calls 1

entriesMethod · 0.45

Tested by

no test coverage detected