@cdxoo/traverse
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "@cdxoo/traverse", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "does not traverseten cats", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -24,3 +24,3 @@ 'use strict'; | ||
var { key, value, parentNode, options } = context; | ||
var { onlyPlainObjects, traverseArrays } = options; | ||
var { onlyPlainObjects, traverseArrays, createPathToken } = options; | ||
@@ -48,3 +48,3 @@ var shouldTraverse = ( | ||
isRoot = false; | ||
path.push(key); | ||
path.push(createPathToken({ parentNode, key, value })); | ||
} | ||
@@ -71,2 +71,3 @@ | ||
traverseArrays = false, | ||
createPathToken = ({ key }) => (key), | ||
} = options; | ||
@@ -80,3 +81,4 @@ | ||
onlyPlainObjects, | ||
traverseArrays | ||
traverseArrays, | ||
createPathToken | ||
} | ||
@@ -100,3 +102,3 @@ }); | ||
var traverse = (that, lambda, options) => { | ||
var traverse = (that, lambda, options = {}) => { | ||
_traverse({ key: undefined, value: that, lambda, options }); | ||
@@ -103,0 +105,0 @@ } |
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
5547
6
132