objection
Advanced tools
Comparing version 3.0.0-alpha.4 to 3.0.0-alpha.5
@@ -192,3 +192,2 @@ 'use strict'; | ||
const out = []; | ||
let outIdx = 0; | ||
@@ -229,2 +228,7 @@ for (let i = 0, l = arrays.length; i < l; ++i) { | ||
const key = path[i]; | ||
if (!isSafeKey(key)) { | ||
return inputObj; | ||
} | ||
let child = obj[key]; | ||
@@ -248,3 +252,7 @@ | ||
if (path.length > 0 && isObject(obj)) { | ||
obj[path[path.length - 1]] = value; | ||
const key = path[path.length - 1]; | ||
if (isSafeKey(key)) { | ||
obj[key] = value; | ||
} | ||
} | ||
@@ -259,3 +267,7 @@ | ||
for (let i = 0, l = keys.length; i < l; ++i) { | ||
out[keys[i]] = values[i]; | ||
const key = keys[i]; | ||
if (isSafeKey(key)) { | ||
out[key] = values[i]; | ||
} | ||
} | ||
@@ -364,2 +376,6 @@ | ||
function isSafeKey(key) { | ||
return isNumber(key) || (isString(key) && key !== '__proto__'); | ||
} | ||
module.exports = { | ||
@@ -366,0 +382,0 @@ isEmpty, |
{ | ||
"name": "objection", | ||
"version": "3.0.0-alpha.4", | ||
"version": "3.0.0-alpha.5", | ||
"description": "An SQL-friendly ORM for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/objection.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
650246
20159