node-getopt
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -42,3 +42,3 @@ // Generated by ToffeeScript 1.4.0 | ||
Getopt.VERSION = '0.2.1'; | ||
Getopt.VERSION = '0.2.2'; | ||
@@ -186,3 +186,3 @@ function Getopt(options) { | ||
if (i < short_names.length - 1) { | ||
argv.unshift(short_names.slice(i + 1)); | ||
argv.unshift(arg.slice(i + 2)); | ||
} | ||
@@ -189,0 +189,0 @@ this.save_option_(rt_options, option, argv); |
{ | ||
"name": "node-getopt", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"author" : "Jiang Miao <jiangfriend@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "featured command line args parser", |
@@ -23,2 +23,16 @@ // Generated by ToffeeScript 1.4.0 | ||
}, 'has-argument'); | ||
getopt = new Getopt([['a', 'has-argument='], ['b', 'no-argument']]); | ||
eq(getopt.parse(['-aone two three']), { | ||
argv: [], | ||
options: { | ||
'has-argument': 'one two three' | ||
} | ||
}, 'has-argument'); | ||
eq(getopt.parse(['-baone two three']), { | ||
argv: [], | ||
options: { | ||
'has-argument': 'one two three', | ||
'no-argument': true | ||
} | ||
}, 'has-argument'); | ||
getopt = new Getopt([['A', 'A'], ['B', 'B'], ['C', 'C']]); | ||
@@ -25,0 +39,0 @@ eq(getopt.parse(['-ABC']), { |
Sorry, the diff of this file is not supported yet
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
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
38463
442