# node-argv-to-object

> convert node argv to json object

Latest version **1.0.0** (published 2020-08-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-argv-to-object
pnpm add node-argv-to-object
yarn add node-argv-to-object
bun add node-argv-to-object
```

## 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.0 |
| Published | 2020-08-01 |
| First published | 2020-08-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | indaam |
| Maintainers | indaam |
| Keywords | argv, program, cli, process, node, object, json |

## Links

- npm: https://www.npmjs.com/package/node-argv-to-object
- npm.io page: https://npm.io/package/node-argv-to-object

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-08-01

## README

# node-argv-to-object
Simple converter node argv to json object


## Install

`npm install node-argv-to-object` or `yarn add node-argv-to-object`


## Usage

```
  const argvToObject = require('node-argv-to-object');
  const argvObject = argvToObject();
  console.log(argvObject);
```

or
```
  const argvObject = require('node-argv-to-object')();
  console.log(argvObject);
```

## Sample
### CLI
```
node sample.js numb=12 arr=[1,2] obj={\"name\":\"indaam\"} str=string other
```
### OUTPUT
```
{
  argv:
   [ '/usr/local/bin/node',
     '.../node-argv-to-object/sample.js',
     'numb=12',
     'arr=[1,2]',
     'obj={"name":"ken"}',
     'str=string',
     'other' ],
  node: '/usr/local/bin/node',
  numb: 12,
  arr: [ 1, 2 ],
  obj: { name: 'indaam' },
  str: 'string',
  other: true // default true
}
```

## License
MIT

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