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

argly

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

argly - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

package.json

@@ -39,3 +39,3 @@ {

},
"version": "1.1.0"
"version": "1.1.1"
}

@@ -302,3 +302,2 @@ argly

* Support number arg: `-x256`
* Detect repeated declared options and throw an error

@@ -305,0 +304,0 @@ # Additional Reading

@@ -166,3 +166,9 @@ var optionRegExp = /^--?(.+)$/;

for (var i = 0, len = aliases.length; i < len; i++) {
this._lookup[aliases[i]] = optionConfig;
var alias = aliases[i];
if (this._lookup[alias]) {
throw new Error("Duplicate option provided '" + alias + "'");
}
this._lookup[alias] = optionConfig;
}

@@ -169,0 +175,0 @@ }

@@ -307,2 +307,22 @@ 'use strict';

});
it('should throw error if repeated option provided in parser', function() {
expect(function() {
require('../')
.createParser({
'--minify -m': 'boolean',
'--minify -t': 'boolean'
});
}).to.throw(/Duplicate option provided \'--minify\'/);
});
it('should throw error if repeated alias provided in parser', function() {
expect(function() {
require('../')
.createParser({
'--minify -m': 'boolean',
'--test -m': 'boolean'
});
}).to.throw(/Duplicate option provided \'-m\'/);
});
});
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