expand-args
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -36,3 +36,5 @@ /*! | ||
if (Array.isArray(orig) && key !== '_') { | ||
res[key] = orig.map(expand); | ||
res[key] = orig.map(function (ele) { | ||
return expand(ele, {toBoolean: true}); | ||
}); | ||
continue; | ||
@@ -46,4 +48,4 @@ } | ||
if (~val.indexOf(':')) { | ||
res[key] = expand(val); | ||
if (/\W/.test(val)) { | ||
res[key] = expand(val, {toBoolean: true}); | ||
continue; | ||
@@ -50,0 +52,0 @@ } |
{ | ||
"name": "expand-args", | ||
"description": "Expand parsed command line arguments using expand-object.", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"homepage": "https://github.com/jonschlinkert/expand-args", | ||
@@ -23,3 +23,3 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"dependencies": { | ||
"expand-object": "^0.3.6", | ||
"expand-object": "^0.3.7", | ||
"extend-shallow": "^2.0.1" | ||
@@ -32,3 +32,14 @@ }, | ||
}, | ||
"keywords": [] | ||
"keywords": [ | ||
"arg", | ||
"args", | ||
"arguments", | ||
"cli", | ||
"command", | ||
"command-line", | ||
"expand", | ||
"expand-object", | ||
"line", | ||
"object" | ||
] | ||
} |
@@ -54,3 +54,3 @@ # expand-args [![NPM version](https://badge.fury.io/js/expand-args.svg)](http://badge.fury.io/js/expand-args) | ||
### fix object keys (mistakenly) set as booleans | ||
### Convert "object-keys" | ||
@@ -62,2 +62,9 @@ ```js | ||
### Expand booleans | ||
```js | ||
expandArgs({set: 'a|b'}); | ||
//=> {set: {a: true, b: true}} | ||
``` | ||
## Related projects | ||
@@ -94,2 +101,2 @@ | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 06, 2015._ | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 07, 2015._ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5978
76
99
Updatedexpand-object@^0.3.7