YuriGor / deepdash

eachDeep, filterDeep, findDeep, someDeep, omitDeep, pickDeep, keysDeep etc.. Tree traversal library written in Underscore/Lodash fashion
https://deepdash.io/
MIT License
274 stars 12 forks source link

Single object root in the 'tree' mode. #10

Closed YuriGor closed 5 years ago

YuriGor commented 5 years ago

Now rootIsChildren option, if set to true, supposes source object is a top-level collection of children. But no options exist to declare source object as a single root tree item, to make iterator pass it to the iteratee/predicate. For this case, we have to wrap such an object into an array before iterating, it looks not so good.