This PR visualizes cyclic structures. It'll replace any reference with an annotation of where it has seen it first. If we have two keys a and b both pointing to c then it'll look like
js
const c = { prop: 'string' }
console.log(format({ a: c, b: c }))
output
a: { prop: 'string' }
b: [References ~a]
This is not a cyclic structure. However, because we can't have proper cyclic structure detection in javascript as far as I know, this is a fair compromise.
Regarding #3, @jordonbiondo
This PR visualizes cyclic structures. It'll replace any reference with an annotation of where it has seen it first. If we have two keys
a
andb
both pointing toc
then it'll look likejs
output
This is not a cyclic structure. However, because we can't have proper cyclic structure detection in javascript as far as I know, this is a fair compromise.
Let me know what you think!