Command parser with support for completers.
npm install cmdparserCommand parser with support for completers.
Made specifically to parse redis command syntax but can be used for other purposes as well.
``bash`
$ npm install cmdparser
`javascript``
var cmdparser = new CmdParser([
"del
"dump
"exists
], {
key: function (partial) {
return ["1111", "1112", "1113"];
}
});
var results = cmdparser.completer("dump 111");
// results = [ ["1111", "1112", "1113"], "111" ]