(2020-06-07)
Features added
- mapValuesDeep - context.skipChildren added to let user override default behavior
Bugs fixed
- mapValuesDeep - method will skip children if value changed type from/to array and use given value as is (#60)
(2020-03-21)
Breaking Changes
- mapDeep renamed to mapValuesDeep to conform to Lodash map/mapValues/mapKeys family of methods.
- mapDeep re-implemented to return an array of deep values processed by iteratee (same as _.map in Lodash)
Features added
- mapKeysDeep implemented - returns object with same values but keys modified by iteratee (same as _.mapKeys in Lodash)
(2020-03-21) Features added
- pathToString prefixes args added to prepend result path correctly. (Used internally to optimize a bit by re-using already stringified paths)
- TypeScript definitions added, see this "discussion" for details.
(2020-02-16)
Features added
- findDeep implemented - returns first meta-value {value, key, parent, context}, iteratee agree with, if none - returns undefined.
- findValueDeep implemented - returns first value,
iteratee agree with, if none - returns undefined. Be carefull, some deep value may exists but also be
undefined
. - findPathDeep implemented - returns first path,
iteratee agree with, if none - returns undefined. Be carefull with
includeRoot
, object itself, passed as data source, also has pathundefined
. - someDeep implemented - returns true if found some deep value, iteratee agree with, if none - return false (just shorthand wrapper for findDeep)
(2019-12-16)
Features added
message
field (if exists) of error thrown by iteratee will be appended by current path, to speed up debug.
(2019-12-7)
Features added
- eachDeep now supports break.(as context.break function passed into iteratee)
Bugs fixed
- filterDeep didn't use onUndefined options for parents skipped due leavesOnly mode.
(2019-04-19)
Features added
- mapDeep implemented
(2019-04-05)
Features added
- reduceDeep implemented
(2019-04-05)
Breaking Changes
- in the browser deepdash doesn't try to patch existing global
_
variable. It now exposes globaldeepdash
function and user should pass a lodash instance to this function manually. - source object will be passed to the iteratee/predicate as a very first value with undefined key/path/parent (see includeRoot option)
indexate
renamed to index.- in case of completely rejected object filterDeep returns null instead of empty {}/[]
- if not an object passed as a source to filterDeep source will be returned if it passes the filter, otherwise null.
- context.treeChildrenPath renamed to childrenPath.
- isTreeChildren, isTreeNode iteratee sub-parameters deprecated (since they are always true in 'tree' mode and false in the 'object' mode)
- regexp children path support dropped to optimise tree walking
tree
sub-object option deprecated,tree.children
renamed tochildrenPath
,tree.rootIsChildren
renamed torootIsChildren
Features added
- cherry-pick separate methods now available as standalone functions or as a lodash mixins.
- standalone version now available
deepdash-es
package created for importing as es6 module. It's just a content ofes
folder from main repo.includeRoot
option added to eachDeep, index, paths (keysDeep) and filterDeep methods.- leavesOnly implemented for tree mode. eachDeep now also has leavesOnly option.
(2019-03-08) ✿❃❀
Breaking Changes
keepUndefined
option removed from the filterDeep method. Use onUndefined:{keepIfEmpty:true}, instead.keys
argument of the omitDeep and pickDeep methods becamepaths
Features added
tree
option added to the filterDeep method.tree
option added to the indexate method.tree
option added to the paths (keysDeep) method.predicate
option of the filterDeep method is Lodash _.iteratee.cloneDeep
option of the filterDeep now can be set tofalse
.callbackAfterIterate
option added to the eachDeep method.onTrue
onUndefined
andonFalse
options added to the filterDeep method.cloneDeep
,keepIfEmpty
,skipChildren
default values can be overwritten for each condition.onMatched
andonNotMatched
options added to the omitDeep and pickDeep methods.- custom object replies from filterDeep iteratee, with
cloneDeep
,keepIfEmpty
,skipChildren
andempty
fields now are supported.
Bugs fixed
- filterDeep method continues to iterate over object's children if it passed the filter.
(2019-03-02)
Features added
tree
option added to the eachDeep method. Now it's much easier to iterate over tree with knownchildren
collection field name / path
Bugs fixed
- Circular reference detector false positive for similar parent/child structure
(2019-02-21)
Breaking Changes
- iteratee/predicate arguments order/structure changed to mimic native js array predicates
Features added
(2019-02-09)
no changelog earlier, sorry