-
-
Notifications
You must be signed in to change notification settings - Fork 14
Description
hey,
I used deepdash's filterdeep method and wrote a predicate which evaluates a boolean expression like
(val, key, parent) => key === 'key' && (val === 'val1' || val === 'val2')
this doesnt work the result would be null, but if I explicit return true everything is fine (like in the official examples).
(val, key, parent) => { if (...) return true }
So, from the docs (https://deepdash.io/#iteratee) I figured out that this is because of "returns - return false explicitly to prevent iteration over current value's children"?
Is my assumption correct and what is this called in JS? I'd like to know more about this but I fail to find anything related to this. Can someone explain or point out some words so I can check?
Edit: I now think it's because it works with undefined for seen nodes so just returning true/false would not work?