An open API service indexing awesome lists of open source software.

https://github.com/joeferner/node-cmdparser

Command parser with support for completers.
https://github.com/joeferner/node-cmdparser

Last synced: over 1 year ago
JSON representation

Command parser with support for completers.

Awesome Lists containing this project

README

          

# cmdparser

Command parser with support for completers.

Made specifically to parse redis command syntax but can be used for other purposes as well.

# Install

```bash
$ npm install cmdparser
```

# Example

```javascript
var cmdparser = new CmdParser([
"del [key ...]",
"dump ",
"exists "
], {
key: function (partial) {
return ["1111", "1112", "1113"];
}
});
var results = cmdparser.completer("dump 111");
// results = [ ["1111", "1112", "1113"], "111" ]
```