# @unsc/parse

> command line argument parser

Latest version **1.7.0** (published 2019-02-18) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @unsc/parse
pnpm add @unsc/parse
yarn add @unsc/parse
bun add @unsc/parse
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.7.0 |
| Published | 2019-02-18 |
| First published | 2019-02-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | 117 |
| Maintainers | unsc |
| Keywords | command, line, cli, arguments, argparser, parsing, commander, minimist, yargs |

## Links

- npm: https://www.npmjs.com/package/@unsc/parse
- Repository: https://github.com/117/parse
- Homepage: https://github.com/117/parse#readme
- Issues: https://github.com/117/parse/issues
- npm.io page: https://npm.io/package/@unsc/parse

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.7.0 (latest) — 2019-02-18
- 1.7.6 — 2019-02-18
- 1.6.6 — 2019-02-16
- 1.5.6 — 2019-02-16
- 1.5.5 — 2019-02-16
- 1.5.4 — 2019-02-16
- 1.5.3 — 2019-02-15
- 1.5.2 — 2019-02-15
- 1.5.1 — 2019-02-15
- 1.5.0 — 2019-02-15
- 1.4.7 — 2019-02-15
- 1.4.6 — 2019-02-15
- 1.3.5 — 2019-02-13
- 1.3.4 — 2019-02-13
- 1.3.3 — 2019-02-13
- … 4 more at https://npm.io/package/@unsc/parse/versions

## README

# parse

![](https://badgen.net/npm/v/@unsc/parse?color=grey)
![](https://badgen.net/npm/dw/@unsc/parse)
![](https://badgen.net/packagephobia/install/@unsc/parse?color=055ff3)
![](https://badgen.net/badge/code%20style/prettier/ff51bc)

### install

`npm install --save @unsc/parse`

### usage

```javascript
import parse from "@unsc/parse";

const custom = parse("my command here --myOption John -myFlag");
// const custom = parse(process.argv); <- You can do this too!

parsed.getCommand(); // my command here
parsed.getOptions(); // { myOption: "John", myFlag: true }
parsed.getOption("myOption"); // John
parsed.getOption("myFlag"); // true
```

That's it! 😜
You now have access to the parsed arguments.

### extras

You can even listen for commands using `.on`.

```javascript
parse.on("my command here", function(options) {
  // the first .on to match gets called, others get ignored
});
```

### contribute

Pull requests are encouraged.

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