Socket
Socket
Sign inDemoInstall

command-line-args

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

command-line-args - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

22

lib/command-line-args.js

@@ -1,2 +0,3 @@

var w = require("wodge"),
var a = require("array-ting"),
o = require("object-ting")
util = require("util"),

@@ -36,4 +37,4 @@ Design = require("nature").Design;

function setOutput(optionName){
var option = w.findWhere(self._attributes, { name: optionName })
|| w.findWhere(self._attributes, { alias: optionName });
var option = a.findWhere(self._attributes, { name: optionName })
|| a.findWhere(self._attributes, { alias: optionName });
if (option){

@@ -45,3 +46,3 @@ if(option.type === Boolean){

if (typeof option.type === "function" && option.type === Array){
value = spliceWhile(argv, /^\w+/);
value = a.spliceWhile(argv, /^\w+/);
} else {

@@ -75,3 +76,3 @@ if (isOption(argv[0])){

if (defaultValues.length > 0){
var defaultOption = w.findWhere(this._attributes, { defaultOption: true });
var defaultOption = a.findWhere(this._attributes, { defaultOption: true });
if (defaultOption){

@@ -94,3 +95,3 @@ if (defaultOption.type === Array){

var filter = "return attribute.groups && attribute.groups.indexOf('" + groupName + "') > -1;";
var optionGroup = w.defined(self.where(filter, model));
var optionGroup = o.defined(self.where(filter, model));
output[groupName] = optionGroup;

@@ -100,3 +101,3 @@ });

} else {
return w.defined(model);
return o.defined(model);
}

@@ -108,8 +109,1 @@ };

};
function spliceWhile(array, test){
for (var i = 0; i < array.length; i++){
if (!test.test(array[i])) break;
}
return array.splice(0, i);
}
{
"name": "command-line-args",
"version": "0.2.1",
"version": "0.2.2",
"description": "Parse command line options",

@@ -26,5 +26,6 @@ "repository": "https://github.com/75lb/command-line-args.git",

"dependencies": {
"array-ting": "^0.2.0",
"nature": "~0.5",
"wodge": "~0.7"
"object-ting": "^0.1.1"
}
}
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