Package Exports
- expand-args
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (expand-args) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
expand-args

Expand parsed command line arguments using expand-object.
Example
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 to see the full range of options and features or to create expansion-related issues.
Install
Install with npm:
$ npm install expand-args --saveUsage
var expandArgs = require('expand-args');expand args to object values
expandArgs({set: 'a:b'})
//=> {set: {a: 'b'}}
expandArgs({set: 'a.b.c:d'})
//=> {set: {a: {b: {c: 'd'}}}}expand args to array values
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"
expandArgs({'a:b': true})
//=> {a: 'b'}Expand booleans
expandArgs({set: 'a|b'});
//=> {set: {a: true, b: true}}Related projects
- expand-object: Expand a string into a JavaScript object using a simple notation. Use the CLI or… more | homepage
- map-config: Map configuration objects to application methods. | homepage
Running tests
Install dev dependencies:
$ npm install -d && npm testContributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Author
Jon Schlinkert
License
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v0.9.0, on April 09, 2016.