@mikeal/is-circular
v1.0.1
Published
checks an object (function or array) for circular references
Downloads
3
Maintainers
Readme
is-circular
Determines if an object (or array) is circular
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