Files
enm-cli/lib/applications/TopologyBrowser/commands/nextAttributes.js
Vyacheslav.Sviridov fc41ae955f first alpha
2022-06-09 20:52:09 +06:00

14 lines
401 B
JavaScript
Executable File

async function nextAttributes(input) {
const filter = input ? input : ''
this.commands = this.configCommands
.filter(item => item.toLowerCase().includes(filter.toLowerCase()))
this.choices = this.attributes
.map(item => item.key)
.filter(item => item.toLowerCase().includes(filter.toLowerCase()))
.sort((a, b) => a > b ? 1 : -1)
}
module.exports = nextAttributes