Comparing version 6.0.0 to 6.0.1
@@ -72,3 +72,3 @@ "use strict"; | ||
else { | ||
if (parent[key]) { | ||
if (typeof parent[key] !== 'undefined') { | ||
throw new Error('cannot add, path exists'); | ||
@@ -83,3 +83,3 @@ } | ||
} | ||
if (!parent[key]) { | ||
if (typeof parent[key] === 'undefined') { | ||
throw new Error('cannot replace, path does not exist'); | ||
@@ -100,3 +100,3 @@ } | ||
const fromParent = from.length ? pointer.resolve(out, `/${from.join('/')}`) : out; | ||
if (!fromParent[fromKey]) { | ||
if (typeof fromParent[fromKey] === 'undefined') { | ||
throw new Error('cannot move, from path does not exist'); | ||
@@ -125,3 +125,3 @@ } | ||
} | ||
else if (!parent[key]) { | ||
else if (typeof parent[key] === 'undefined') { | ||
throw new Error('cannot remove, path does not exist'); | ||
@@ -147,3 +147,3 @@ } | ||
const fromParent = from.length ? pointer.resolve(out, `/${from.join('/')}`) : out; | ||
if (!fromParent[fromKey]) { | ||
if (typeof fromParent[fromKey] === 'undefined') { | ||
throw new Error('cannot move, from path does not exist'); | ||
@@ -150,0 +150,0 @@ } |
{ | ||
"name": "jsonref", | ||
"version": "6.0.0", | ||
"version": "6.0.1", | ||
"description": "Javascript References ($ref) and Pointers library", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
35999
1