Files
enm-cli/lib/applications/TopologyBrowser/commands/nextAttributes.js
2022-06-30 18:15:59 +06:00

16 lines
412 B
JavaScript
Executable File

const chalk = require('chalk')
async function nextAttributes(input) {
this.commands = this.configCommands
this.choices = this.attributes
.map(({ key, value }) => ({
value: key,
short: key,
name: `${key} ${chalk.dim(typeof value !== 'object' || value === null ? value : '...')}`
}))
.sort((a, b) => a.value > b.value ? 1 : -1)
}
module.exports = nextAttributes