# argv_store

> 命令行参数管理工具

Latest version **1.0.7** (published 2020-06-18) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2020-06-18 |
| First published | 2020-02-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | mqx |
| Maintainers | zhanan |
| Keywords | nodejs |

## Links

- npm: https://www.npmjs.com/package/argv_store
- Repository: https://github.com/HuskyToMa/argv_store
- Homepage: https://github.com/HuskyToMa/argv_store#readme
- Issues: https://github.com/HuskyToMa/argv_store/issues
- npm.io page: https://npm.io/package/argv_store

## Dependencies (1)

- [chalk](https://npm.io/package/chalk.md) ^3.0.0

## Recent versions

- 1.0.7 (latest) — 2020-06-18
- 1.0.6 — 2020-06-17
- 1.0.5 — 2020-06-17
- 1.0.4 — 2020-06-17
- 1.0.3 — 2020-03-14
- 1.0.2 — 2020-02-29
- 1.0.1 — 2020-02-29

## README

# argv_store

node命令行管理，操作参数以及对应的方法实现

## 使用

### 内部方法

|方法名|解释|参数|
|:-|:-:|-:|
|version|添加对应模块版本|version(string)|
|command|添加命令方法|(方法名， 解释信息， 调用方法)|
|options|添加命令的参数, 使用前必须存在command|（参数名， 解释信息）|
|parse|执行方法（必须调用）|null|

### code

``` javascript

const program = new argvStore();

const test = function() {
    // 获取到的输入的参数
    console.log(this.argv);
    // 直接获取keyMap，即option以及他对应的参数
    getKeyMap()
}

program
    .version(packageJson.version)
    .command('build', '构建', build)
    .options('-b --build', '构建参数')
    .options('-c --client', '构建参数', test)
    .command('dev', '开发', devServer)
    .parse();

```

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