# expand-args

> Expand parsed command line arguments using expand-object.

Latest version **0.4.3** (published 2016-07-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install expand-args
pnpm add expand-args
yarn add expand-args
bun add expand-args
```

## 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.4.3 |
| Published | 2016-07-12 |
| First published | 2015-08-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 7 |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | arg, args, arguments, cli, command, command-line, expand, expand-object, line, object |

## Links

- npm: https://www.npmjs.com/package/expand-args
- Repository: https://github.com/jonschlinkert/expand-args
- Issues: https://github.com/jonschlinkert/expand-args/issues
- npm.io page: https://npm.io/package/expand-args

## Dependencies (7)

- [kind-of](https://npm.io/package/kind-of.md) ^3.0.3
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [set-value](https://npm.io/package/set-value.md) ^0.3.3
- [lazy-cache](https://npm.io/package/lazy-cache.md) ^2.0.1
- [mixin-deep](https://npm.io/package/mixin-deep.md) ^1.1.3
- [omit-empty](https://npm.io/package/omit-empty.md) ^0.4.1
- [expand-object](https://npm.io/package/expand-object.md) ^0.4.2

## 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

- 0.4.3 (latest) — 2016-07-12
- 0.4.2 — 2016-05-12
- 0.4.1 — 2016-04-11
- 0.4.0 — 2016-04-09
- 0.3.6 — 2016-02-11
- 0.3.5 — 2016-02-04
- 0.3.4 — 2016-02-04
- 0.3.3 — 2016-01-29
- 0.3.2 — 2016-01-29
- 0.3.1 — 2015-12-23
- 0.3.0 — 2015-11-03
- 0.2.2 — 2015-11-02
- 0.2.1 — 2015-08-15
- 0.2.0 — 2015-08-15
- 0.1.1 — 2015-08-07
- … 1 more at https://npm.io/package/expand-args/versions

## README

# expand-args [![NPM version](https://img.shields.io/npm/v/expand-args.svg?style=flat)](https://www.npmjs.com/package/expand-args) [![NPM downloads](https://img.shields.io/npm/dm/expand-args.svg?style=flat)](https://npmjs.org/package/expand-args) [![Build Status](https://img.shields.io/travis/jonschlinkert/expand-args.svg?style=flat)](https://travis-ci.org/jonschlinkert/expand-args)

Expand parsed command line arguments using expand-object.

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install --save expand-args
```

## Usage

```js
var expandArgs = require('expand-args');
```

**Example**

```js
var minimist = require('minimist');
var expandArgs = require('expand-args');

var argv = minimist(['--set=a:b,c:d']);
//=> { _: [], set: 'a:b,c:d' }

expandArgs(argv);
//=> { _: [], set: [{ a: 'b' }, { c: 'd' }] }
```

Visit [expand-object](https://github.com/jonschlinkert/expand-object) to see the full range of options and features or to create expansion-related issues.

### expand args to object values

```js
expandArgs({set: 'a:b'})
//=> {set: {a: 'b'}}

expandArgs({set: 'a.b.c:d'})
//=> {set: {a: {b: {c: 'd'}}}}
```

### expand args to array values

```js
expandArgs({set: 'a:b,c:d'})
//=> {set: [{a: 'b'}, {c: 'd'}]}

expandArgs({set: 'a.b.c:d,e,f'})
//=> {set: {a: {b: {c: ['d', 'e', 'f']}}}}
```

### Convert "object-keys"

```js
expandArgs({'a:b': true})
//=> {a: 'b'}
```

### Expand booleans

```js
expandArgs({set: 'a|b'});
//=> {set: {a: true, b: true}}
```

## About

### Related projects

* [expand-object](https://www.npmjs.com/package/expand-object): Expand a string into a JavaScript object using a simple notation. Use the CLI or… [more](https://github.com/jonschlinkert/expand-object) | [homepage](https://github.com/jonschlinkert/expand-object "Expand a string into a JavaScript object using a simple notation. Use the CLI or as a node.js lib.")
* [map-config](https://www.npmjs.com/package/map-config): Map configuration objects to application methods. | [homepage](https://github.com/doowb/map-config "Map configuration objects to application methods.")

### Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).

### Building docs

_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_

Generate readme and API documentation with [verb](https://github.com/verbose/verb):

```sh
$ npm install -g verb verb-generate-readme && verb
```

### Running tests

Install dev dependencies:

```sh
$ npm install -d && npm test
```

### Author

**Jon Schlinkert**

* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

### License

Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT license](https://github.com/jonschlinkert/expand-args/blob/master/LICENSE).

***

_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on July 12, 2016._

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