Hello, nice and fast traversing lib. I am trying to filter an large hierarchiel Open API schema object, beforehand I dereferenced the schema's to one root object. I am using this object to search and filter properties. So far traversing is working but it excludes properties with same values. I believe it has to do with line 86 in traverse.ts where it skips nodes (values) that have already been visited.
Is there a workaround to include nodes that have different keys but are using the same objects/ models which are visited?
Example
Lets say I have a Person model with two address properties that have the same Address model (see input code). When I run the code below, I will only get access to person.address, but not person.foreignAddress because it is not included. I would like to all the nodes included when traversing.
When I set cycleHandling option to off, it works but I need this otherwise I will have performance issues where the maximum size will exceed.
Hello, nice and fast traversing lib. I am trying to filter an large hierarchiel Open API schema object, beforehand I dereferenced the schema's to one root object. I am using this object to search and filter properties. So far traversing is working but it excludes properties with same values. I believe it has to do with line 86 in traverse.ts where it skips nodes (values) that have already been visited.
Is there a workaround to include nodes that have different keys but are using the same objects/ models which are visited?
Example Lets say I have a Person model with two address properties that have the same Address model (see input code). When I run the code below, I will only get access to
person.address
, but notperson.foreignAddress
because it is not included. I would like to all the nodes included when traversing.When I set cycleHandling option to off, it works but I need this otherwise I will have performance issues where the maximum size will exceed.
Input
Code