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.
Now
rootIsChildren
option, if set totrue
, 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.