expand-args
Advanced tools
Comparing version 0.3.5 to 0.3.6
12
index.js
@@ -11,3 +11,3 @@ /*! | ||
var utils = require('./utils'); | ||
var sep = /[ =:]/; | ||
var sep = /[=:]/; | ||
@@ -50,5 +50,7 @@ function expand(argv, options) { | ||
utils.set(res, key, expandEach(val)); | ||
} else if (isUrl(val)) { | ||
utils.set(res, key, expandString(val)); | ||
} else if (~val.indexOf(',')) { | ||
} else if (/\w,\w/.test(val)) { | ||
val = expandString(val); | ||
@@ -62,3 +64,4 @@ if (Array.isArray(val) && hasObjects(val)) { | ||
} | ||
} else { | ||
} else if (sep.test(val)) { | ||
if (opts.esc && ~opts.esc.indexOf(key)) { | ||
@@ -72,2 +75,5 @@ val = val.split('.').join('\\.'); | ||
utils.set(res, key, expandString(val)); | ||
} else { | ||
res[key] = val.split('\\.').join('.'); | ||
} | ||
@@ -74,0 +80,0 @@ break; |
{ | ||
"name": "expand-args", | ||
"description": "Expand parsed command line arguments using expand-object.", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"homepage": "https://github.com/jonschlinkert/expand-args", | ||
@@ -6,0 +6,0 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", |
@@ -95,6 +95,6 @@ # expand-args [](https://www.npmjs.com/package/expand-args) [](https://travis-ci.org/jonschlinkert/expand-args) | ||
Copyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert) | ||
Released under the MIT license. | ||
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) on January 29, 2016._ | ||
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on February 11, 2016._ |
9073
188