Comparing version 0.6.3 to 0.6.5
12
index.js
@@ -13,3 +13,3 @@ var traverse = module.exports = function (obj) { | ||
var key = ps[i]; | ||
if (!Object.hasOwnProperty.call(node, key)) { | ||
if (!node || !hasOwnProperty.call(node, key)) { | ||
node = undefined; | ||
@@ -27,3 +27,3 @@ break; | ||
var key = ps[i]; | ||
if (!Object.hasOwnProperty.call(node, key)) { | ||
if (!node || !hasOwnProperty.call(node, key)) { | ||
return false; | ||
@@ -40,3 +40,3 @@ } | ||
var key = ps[i]; | ||
if (!Object.hasOwnProperty.call(node, key)) node[key] = {}; | ||
if (!hasOwnProperty.call(node, key)) node[key] = {}; | ||
node = node[key]; | ||
@@ -212,3 +212,3 @@ } | ||
var child = walker(state.node[key]); | ||
if (immutable && Object.hasOwnProperty.call(state.node, key)) { | ||
if (immutable && hasOwnProperty.call(state.node, key)) { | ||
state.node[key] = child.node; | ||
@@ -315,1 +315,5 @@ } | ||
}); | ||
var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { | ||
return key in obj; | ||
}; |
{ | ||
"name" : "traverse", | ||
"version" : "0.6.3", | ||
"version" : "0.6.5", | ||
"description" : "traverse and transform objects by visiting every node on a recursive walk", | ||
"main" : "index.js", | ||
"bin" : {}, | ||
"directories" : { | ||
@@ -11,5 +10,5 @@ "example" : "example", | ||
}, | ||
"dependencies" : {}, | ||
"devDependencies" : { | ||
"tap" : "~0.2.5" | ||
"tap" : "~0.3.3", | ||
"tape" : "~0.1.1" | ||
}, | ||
@@ -19,2 +18,12 @@ "scripts" : { | ||
}, | ||
"testling" : { | ||
"files" : "test/*.js", | ||
"browsers" : { | ||
"iexplore" : [ "6.0", "7.0", "8.0", "9.0" ], | ||
"chrome" : [ "10.0", "20.0" ], | ||
"firefox" : [ "10.0", "15.0" ], | ||
"safari" : [ "5.1" ], | ||
"opera" : [ "12.0" ] | ||
} | ||
}, | ||
"repository" : { | ||
@@ -39,4 +48,3 @@ "type" : "git", | ||
}, | ||
"license" : "MIT", | ||
"engine" : { "node" : ">=0.6" } | ||
"license" : "MIT" | ||
} |
@@ -1,2 +0,2 @@ | ||
var test = require('tap').test; | ||
var test = require('tape'); | ||
var traverse = require('../'); | ||
@@ -3,0 +3,0 @@ var deepEqual = require('./lib/deep_equal'); |
@@ -1,2 +0,2 @@ | ||
var test = require('tap').test; | ||
var test = require('tape'); | ||
var traverse = require('../'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var test = require('tap').test; | ||
var test = require('tape'); | ||
var traverse = require('../'); | ||
@@ -3,0 +3,0 @@ var deepEqual = require('./lib/deep_equal'); |
@@ -1,2 +0,2 @@ | ||
var test = require('tap').test; | ||
var test = require('tape'); | ||
var traverse = require('../'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var test = require('tap').test; | ||
var test = require('tape'); | ||
var traverse = require('../'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var test = require('tap').test; | ||
var test = require('tape'); | ||
var traverse = require('../'); | ||
@@ -3,0 +3,0 @@ var EventEmitter = require('events').EventEmitter; |
@@ -1,2 +0,2 @@ | ||
var test = require('tap').test; | ||
var test = require('tape'); | ||
var traverse = require('../'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var test = require('tap').test; | ||
var test = require('tape'); | ||
var traverse = require('../'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var test = require('tap').test; | ||
var test = require('tape'); | ||
var traverse = require('../'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var test = require('tap').test; | ||
var test = require('tape'); | ||
var traverse = require('../'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var test = require('tap').test; | ||
var test = require('tape'); | ||
var traverse = require('../'); | ||
@@ -3,0 +3,0 @@ var deepEqual = require('./lib/deep_equal'); |
var traverse = require('../'); | ||
var test = require('tap').test; | ||
var test = require('tape'); | ||
@@ -4,0 +4,0 @@ test('negative update test', function (t) { |
@@ -1,2 +0,2 @@ | ||
var test = require('tap').test; | ||
var test = require('tape'); | ||
var traverse = require('../'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var test = require('tap').test; | ||
var test = require('tape'); | ||
var traverse = require('../'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var test = require('tap').test; | ||
var test = require('tape'); | ||
var traverse = require('../'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var test = require('tap').test; | ||
var test = require('tape'); | ||
var traverse = require('../'); | ||
@@ -3,0 +3,0 @@ |
var traverse = require('../'); | ||
var test = require('tap').test; | ||
var test = require('tape'); | ||
@@ -4,0 +4,0 @@ test('subexpr', function (t) { |
@@ -1,2 +0,2 @@ | ||
var test = require('tap').test; | ||
var test = require('tape'); | ||
var traverse = require('../'); | ||
@@ -3,0 +3,0 @@ var deepEqual = require('./lib/deep_equal'); |
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
47470
2
31
1381
210