Meet npm Pro: unlimited public & private packages + package-based permissions.Learn more »

is-circular

1.0.2 • Public • Published

is-circular Build Status js-standard-style

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

Install

npm i is-circular

DownloadsWeekly Downloads

13,103

Version

1.0.2

License

MIT

Unpacked Size

6.03 kB

Total Files

8

Last publish

Collaborators

  • avatar