For example:
$ node
> var x = {}
undefined
> x.x = x
{ x: [Circular] }
Wondering the sort of structures are they using to accomplish this, because it's not encoded directly into what I just did. It seems like they would do something like:
var graph = new Graph(object)
graph.detectCircularReferences()
And then it would get them, but not sure how that works. Hoping to learn how to implement that.