# cmdparser

> Command parser with support for completers.

Latest version **0.1.0** (published 2023-03-22) · 0 weekly downloads

## Install

```sh
npm install cmdparser
pnpm add cmdparser
yarn add cmdparser
bun add cmdparser
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2023-03-22 |
| First published | 2012-06-20 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 1 |
| Unpacked size | 29.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Joe Ferner |
| Maintainers | joeferner |
| Keywords | parser, command, redis |

## Links

- npm: https://www.npmjs.com/package/cmdparser
- Repository: https://github.com/nearinfinity/node-cmdparser
- Homepage: https://github.com/nearinfinity/node-cmdparser#readme
- Issues: https://github.com/nearinfinity/node-cmdparser/issues
- npm.io page: https://npm.io/package/cmdparser

## Dependencies (1)

- [async](https://npm.io/package/async.md) ^3.2.3

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2023-03-22
- 0.0.3 — 2012-07-24
- 0.0.2 — 2012-06-20
- 0.0.1 — 2012-06-20

## 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> [key ...]",
  "dump <key>",
  "exists <key>"
], {
  key: function (partial) {
    return ["1111", "1112", "1113"];
  }
});
var results = cmdparser.completer("dump 111");
// results = [ ["1111", "1112", "1113"], "111" ]
```

---
_Source: https://npm.io/package/cmdparser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
