Socket
Socket
Sign inDemoInstall

minimist

Package Overview
Dependencies
0
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.1.2

7

index.js

@@ -96,3 +96,8 @@ module.exports = function (args, opts) {

var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
setArg(m[1], m[2], arg);
var key = m[1];
var value = m[2];
if (flags.bools[key]) {
value = value !== 'false';
}
setArg(key, value, arg);
}

@@ -99,0 +104,0 @@ else if (/^--no-.+/.test(arg)) {

2

package.json
{
"name": "minimist",
"version": "1.1.1",
"version": "1.1.2",
"description": "parse argument options",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -120,1 +120,25 @@ var parse = require('../');

});
test('boolean --boool=true', function (t) {
var parsed = parse(['--boool=true'], {
default: {
boool: false
},
boolean: ['boool']
});
t.same(parsed.boool, true);
t.end();
});
test('boolean --boool=false', function (t) {
var parsed = parse(['--boool=false'], {
default: {
boool: true
},
boolean: ['boool']
});
t.same(parsed.boool, false);
t.end();
});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc