just-diff-apply
Advanced tools
Comparing version 4.0.1 to 5.0.0
@@ -78,2 +78,3 @@ module.exports = { | ||
var lastProp = pathCopy.pop(); | ||
prototypeCheck(lastProp); | ||
if (lastProp == null) { | ||
@@ -84,2 +85,3 @@ return false; | ||
while (((thisProp = pathCopy.shift())) != null) { | ||
prototypeCheck(thisProp); | ||
if (!(thisProp in subObject)) { | ||
@@ -108,1 +110,7 @@ subObject[thisProp] = {}; | ||
} | ||
function prototypeCheck(prop) { | ||
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') { | ||
throw new Error('setting of prototype values not supported'); | ||
} | ||
} |
{ | ||
"name": "just-diff-apply", | ||
"version": "4.0.1", | ||
"version": "5.0.0", | ||
"description": "Apply a diff to an object. Optionally supports jsonPatch protocol", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,1 +1,3 @@ | ||
<!-- DO NOT EDIT THIS FILE! THIS FILE WAS AUTOGENERATED BY TEMPLATE-MATE --> | ||
## just-diff-apply | ||
@@ -2,0 +4,0 @@ |
Sorry, the diff of this file is not supported yet
10082
7
209
61