Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-getopt

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-getopt - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

4

lib/getopt.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc