yargs-parser
Advanced tools
Comparing version 18.1.0 to 18.1.1-beta.0
16
index.js
@@ -700,2 +700,6 @@ const camelCase = require('camelcase') | ||
keys.slice(0, -1).forEach(function (key, index) { | ||
// TODO(bcoe): in the next major version of yargs, switch to | ||
// Object.create(null) for dot notation: | ||
key = sanitizeKey(key) | ||
if (typeof o === 'object' && o[key] === undefined) { | ||
@@ -720,3 +724,6 @@ o[key] = {} | ||
const key = keys[keys.length - 1] | ||
// TODO(bcoe): in the next major version of yargs, switch to | ||
// Object.create(null) for dot notation: | ||
const key = sanitizeKey(keys[keys.length - 1]) | ||
const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays) | ||
@@ -1006,2 +1013,9 @@ const isValueArray = Array.isArray(value) | ||
// TODO(bcoe): in the next major version of yargs, switch to | ||
// Object.create(null) for dot notation: | ||
function sanitizeKey (key) { | ||
if (key === '__proto__') return '___proto___' | ||
return key | ||
} | ||
module.exports = Parser |
{ | ||
"name": "yargs-parser", | ||
"version": "18.1.0", | ||
"version": "18.1.1-beta.0", | ||
"description": "the mighty option parser used by yargs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
69667
925
1