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

commandos

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commandos - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # commandos Change Log

## [0.0.3] - Dec 23, 2017
* Fixed: `ReferenceError: extractProperty is not defined`
## [0.0.2] - Dec 22, 2017

@@ -7,0 +11,0 @@

5

package.json

@@ -15,3 +15,3 @@ {

"name": "commandos",
"version": "0.0.2",
"version": "0.0.3",
"main": "index.js",

@@ -23,3 +23,4 @@ "keywords": [

"options",
"dos"
"dos",
"getopts"
],

@@ -26,0 +27,0 @@ "homepage": "https://github.com/YounGoat/nodejs.commandos",

@@ -263,2 +263,3 @@ 'use strict';

// *names* includes formal name and alias.
const names = [ column.name ].concat(column.alias);

@@ -294,11 +295,2 @@ const names_lc = caseSensitive ? null : names.map(name => name.toLowerCase());

if (!found && column.alias) {
// If property not found, try alias if defined.
let alias = column.alias instanceof Array ? column.alias : [ column.alias ];
for (let i = 0; i < alias.length && !found; i++) {
// If there are more than one alias, the former in definition is prior.
found = extractProperty(alias[i], propertyName);
}
}
if (found && !column.nullable && typeof value == 'boolean') {

@@ -305,0 +297,0 @@ throw new Error(`option need to be valued: ${names_notation}`);

@@ -209,5 +209,16 @@ 'use strict';

];
let settings = { overwrite: true, options };
assert.throws(() => parseCommand(cmdtext, settings));
assert.throws(() => parseCommand(cmdtext, options));
});
it('required disabled', () => {
let cmdtext = 'foo';
let options = [
{
name: 'version',
alias: 'v',
required: false,
}
];
parseCommand(cmdtext, options);
});
});

@@ -214,0 +225,0 @@

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