You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP →

cli-argparse

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-argparse - npm Package Compare versions

Comparing version

to
0.2.0

@@ -42,3 +42,4 @@ var short = '-', long = '--';

var flag = (!next && !~equals)
|| (next && next.indexOf(short) == 0 && !~equals);
|| (next && (next.indexOf(short) == 0 && next != short) && !~equals);
if(next == short) output.stdin = true;
if(~equals) {

@@ -45,0 +46,0 @@ value = arg.slice(equals + 1); arg = arg.slice(0, equals);

{
"name": "cli-argparse",
"version": "0.1.7",
"version": "0.2.0",
"description": "Lightweight argument parser",

@@ -5,0 +5,0 @@ "author": "muji <noop@xpm.io>",

@@ -26,2 +26,10 @@ var expect = require('chai').expect;

});
it('should accept stdin as value', function(done) {
var args = ['--file', '-'];
var result = parse(args);
expect(result.raw).to.eql(args);
expect(result.stdin).to.eql(true);
expect(result.options.file).to.eql('-');
done();
});
})