traverse
Advanced tools
Comparing version 0.5.2 to 0.6.0
12
index.js
@@ -20,2 +20,14 @@ module.exports = Traverse; | ||
Traverse.prototype.has = function (ps) { | ||
var node = this.value; | ||
for (var i = 0; i < ps.length; i ++) { | ||
var key = ps[i]; | ||
if (!Object.hasOwnProperty.call(node, key)) { | ||
return false; | ||
} | ||
node = node[key]; | ||
} | ||
return true; | ||
}; | ||
Traverse.prototype.set = function (ps, value) { | ||
@@ -22,0 +34,0 @@ var node = this.value; |
{ | ||
"name" : "traverse", | ||
"version" : "0.5.2", | ||
"version" : "0.6.0", | ||
"description" : "Traverse and transform objects by visiting every node on a recursive walk", | ||
@@ -5,0 +5,0 @@ "author" : "James Halliday", |
Sorry, the diff of this file is not supported yet
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
45469
29
1269
257
0
1