is-circular
v1.0.2
Published
high-performance, zero-dependency circular reference check for objects (or arrays)
Downloads
1,586,656
Maintainers
Readme
is-circular
High-performance circular reference check for objects (or arrays) w/ no dependencies
Installation
npm install is-circular
Usage
var isCircular = require('is-circular')
var circularObj = {
foo: 1,
bar: 2
}
circularObj.qux = circularObj
isCircular(circularObj) // true
var obj = {
foo: 1,
bar: 2,
qux: 3
}
isCircular(obj) // false
License
MIT