0.0.6 • Published 3 years ago

@kli-tool/searcher v0.0.6

Weekly downloads
175
License
MIT
Repository
github
Last release
3 years ago

KLI Command Searcher

Accepts an array of commands with a name and aliases, then returns a searcher that can be used to autcomplete and detect which command was intended.

    it('ensure searching for all aliases and names are the same', assert => {
        const subject = searcher({
            commands: [
                {
                    name: 'command',
                    aliases: ['test', 'another'],
                },
            ],
        })
        const name = subject.get('comm')[0]
        const alias1 = subject.get('test')[0]
        const alias2 = subject.get('anot')[0]
        assert.ok(name === alias1 && alias1 === alias2 && alias2 === name)
    })
0.0.3

3 years ago

0.0.2

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.6

3 years ago

0.0.1

5 years ago