Socket
Socket
Sign inDemoInstall

minimist

Package Overview
Dependencies
0
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.0 to 0.2.1

test/proto.js

15

index.js

@@ -178,8 +178,17 @@ module.exports = function (args, opts) {

var o = obj;
keys.slice(0,-1).forEach(function (key) {
for (var i = 0; i < keys.length-1; i++) {
var key = keys[i];
if (key === '__proto__') return;
if (o[key] === undefined) o[key] = {};
if (o[key] === Object.prototype || o[key] === Number.prototype
|| o[key] === String.prototype) o[key] = {};
if (o[key] === Array.prototype) o[key] = [];
o = o[key];
});
}
var key = keys[keys.length - 1];
if (key === '__proto__') return;
if (o === Object.prototype || o === Number.prototype
|| o === String.prototype) o = {};
if (o === Array.prototype) o = [];
if (o[key] === undefined || typeof o[key] === 'boolean') {

@@ -186,0 +195,0 @@ o[key] = value;

2

package.json
{
"name": "minimist",
"version": "0.2.0",
"version": "0.2.1",
"description": "parse argument options",

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

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