(paramsObj = {})
| 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') |
no test coverage detected