Removing properties and elements set to null in JavaScript
I can't think of any good use-case for this method. It may help to describe some examples of why you need this functionality.

That said, a few issues I see:


func could be named better (predicate perhaps?).
maxRecursion seems a bit unstable. This is where I have a hard time seeing the purpose of this method. What happens if you hit level 20 and it hasn't fully run it's course? Now you've got an object that is in a half-complete state without any way to know it. What if it spends 20 cycles on the first property which happens to be a circular reference?
I think the use of lodash here adds confusion to what would otherwise be pretty straightforward javascript (opinion).


Some fixes:


Don't use a recursive function. You could use a stack or a queue here to traverse the object tree.
Rather than limit the depth to avoid stack overflows for circular references, you could try to detect them by keeping a table of references and avoid re-traversing those trees altogether.
Rather than modifying an existing object, you could create a new one. That way, this method wouldn't produce any side-effects and potentially leave you in an unstable state. At minimum, you could return true/false if the method succeeded.