command-line-args
Advanced tools
Comparing version 3.0.2 to 3.0.3-0
@@ -37,5 +37,5 @@ 'use strict'; | ||
optEquals: new Arg(/^(--\S+)=(.*)/) | ||
optEquals: new Arg(/^(--\S+?)=(.*)/) | ||
}; | ||
module.exports = option; |
@@ -28,5 +28,5 @@ 'use strict' | ||
isOption (arg) { return this.short.test(arg) || this.long.test(arg) }, | ||
optEquals: new Arg(/^(--\S+)=(.*)/) | ||
optEquals: new Arg(/^(--\S+?)=(.*)/) | ||
} | ||
module.exports = option |
{ | ||
"name": "command-line-args", | ||
"version": "3.0.2", | ||
"version": "3.0.3-0", | ||
"description": "A library to parse command-line options.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/75lb/command-line-args.git", |
@@ -36,1 +36,15 @@ 'use strict' | ||
}) | ||
runner.test('option=value notation: value contains "="', function () { | ||
var optionDefinitions = [ | ||
{ name: 'url' }, | ||
{ name: 'two' }, | ||
{ name: 'three' } | ||
] | ||
var argv = [ '--url=my-url?q=123', '--two', '2', '--three=3' ] | ||
var result = cliArgs(optionDefinitions, argv) | ||
a.strictEqual(result.url, 'my-url?q=123') | ||
a.strictEqual(result.two, '2') | ||
a.strictEqual(result.three, '3') | ||
}) |
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
78049
1868
2