

Show HN: Node.js visit values util - ikessler
https://github.com/kessler/node-visit-values

======
mattkrea
I'll admit I'm having trouble imagining a use case for this but I must ask:

What happens with arrays?

What happens with deeply nested objects?

Also if you don't mind me asking what case might you want something like this
where you don't seem to care about the context of the key and value (i.e. top
level key and top level value version deeply nested key of, potentially, the
same name.)?

~~~
ikessler
The use case is quite simple, I want to iterate over all values in an object
(and possibly manipulate it, that is why the visitor function has access to
the parent)

Array members will be visited individually.

The entire object tree will be visited in a depth first order

hope that answers your questions.

