Comparing version 1.8.0 to 1.8.1
@@ -163,2 +163,3 @@ 'use strict'; | ||
leafsOnly: true, | ||
pathFormat: 'string', | ||
}, | ||
@@ -169,2 +170,3 @@ options || {} | ||
track: options.checkCircular, | ||
pathFormat: options.pathFormat, | ||
}; | ||
@@ -171,0 +173,0 @@ var res = []; |
{ | ||
"name": "deepdash", | ||
"version": "1.8.0", | ||
"version": "1.8.1", | ||
"description": "Object tree traversal for lodash", | ||
@@ -5,0 +5,0 @@ "main": "deepdash.js", |
@@ -188,3 +188,3 @@ <img src="deepdash.svg?sanitize=true" width="64px"/> | ||
pathFormat: 'string'/* 'string'|'array' - specifies the format of paths passed to the iteratee. | ||
'array' is better for performance.*/ | ||
'array' is better for performance. 'string' is better for readability. */ | ||
} | ||
@@ -259,3 +259,3 @@ ) | ||
pathFormat: 'string', /* 'string'|'array' - specifies the format of paths passed to the iteratee. | ||
'array' is better for performance.*/ | ||
'array' is better for performance. 'string' is better for readability. */ | ||
} | ||
@@ -356,4 +356,6 @@ ) | ||
Option ignored if `checkCircular:false`. */ | ||
leafsOnly: true /* Return paths to childless values only by default. | ||
leafsOnly: true, /* Return paths to childless values only by default. | ||
Or all the paths will be returned, including parents, if set to false. */ | ||
pathFormat: 'string', /* 'string'|'array' - specifies the format of paths. | ||
'array' is better for performance. 'string' is better for readability. */ | ||
} | ||
@@ -360,0 +362,0 @@ ) |
@@ -136,2 +136,21 @@ 'use strict'; | ||
}); | ||
it('array paths format', () => { | ||
var paths = _.paths(demo, { pathFormat: 'array' }); | ||
expect(paths).to.deep.equal([ | ||
['a', 'b', 'c', 'd', '0', 'i'], | ||
['a', 'b', 'c', 'd', '1', 'i'], | ||
['a', 'b', 'c', 'd', '2', 'i'], | ||
['a', 'b', 'c', 'd', '3', 'i'], | ||
['a', 'b', 'c', 'd', '4', 'i'], | ||
['a', 'b', 'c', 'd', '5', 'i'], | ||
['a', 'b', 'c', 'd', '6', 'o', 'd'], | ||
['a', 'b', 'c', 'd', '6', 'o', 'f'], | ||
['a', 'b', 'c', 'd', '6', 'o', 'skip', 'please', 'dont', 'go', 'here'], | ||
['a', 'b', 'c', 's'], | ||
['a', 'b', 'b'], | ||
['a', 'n'], | ||
['a', 'u'], | ||
['nl'], | ||
]); | ||
}); | ||
}); |
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
78295
2196
419