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

yargs

Package Overview
Dependencies
Maintainers
2
Versions
250
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yargs - npm Package Compare versions

Comparing version 15.3.0 to 15.3.1-beta.0

5

package.json
{
"name": "yargs",
"version": "15.3.0",
"version": "15.3.1-beta.0",
"description": "yargs the modern, pirate-themed, successor to optimist.",

@@ -32,3 +32,3 @@ "main": "./index.js",

"y18n": "^4.0.0",
"yargs-parser": "^18.1.0"
"yargs-parser": "^18.1.1-beta.0"
},

@@ -39,2 +39,3 @@ "devDependencies": {

"chalk": "^3.0.0",
"coveralls": "^3.0.9",
"cpr": "^3.0.1",

@@ -41,0 +42,0 @@ "cross-spawn": "^7.0.0",

11

yargs.js

@@ -262,2 +262,3 @@ 'use strict'

keys.forEach((key) => {
key = sanitizeKey(key)
options[type].push(key)

@@ -318,4 +319,4 @@ })

if (Array.isArray(key)) {
const temp = Object.create(null)
// an array of keys with one value ['x', 'y', 'z'], function parse () {}
const temp = {}
key.forEach((k) => {

@@ -331,2 +332,3 @@ temp[k] = value

} else {
key = sanitizeKey(key)
// a single key value pair 'x', parse() {}

@@ -341,2 +343,9 @@ if (isArray) {

// TODO(bcoe): in future major versions move more objects towards
// Object.create(null):
function sanitizeKey (key) {
if (key === '__proto__') return '___proto___'
return key
}
function deleteFromParserHintObject (optionKey) {

@@ -343,0 +352,0 @@ // delete from all parsing hints:

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