(items, limiter)
| 201 | } |
| 202 | |
| 203 | #output (items, limiter) { |
| 204 | const outputs = {} |
| 205 | const lookup = { |
| 206 | __proto__: null, |
| 207 | read: 'read-only', |
| 208 | write: 'read-write', |
| 209 | } |
| 210 | for (const item in items) { |
| 211 | const val = items[item] |
| 212 | outputs[item] = lookup[val] || val |
| 213 | } |
| 214 | if (this.npm.config.get('json')) { |
| 215 | output.buffer(outputs) |
| 216 | } else { |
| 217 | for (const item of Object.keys(outputs).sort(localeCompare)) { |
| 218 | if (!limiter || limiter === item) { |
| 219 | output.standard(`${item}: ${outputs[item]}`) |
| 220 | } |
| 221 | } |
| 222 | } |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | module.exports = Access |
no test coverage detected