Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@ipld/is-circular

1.0.3 • 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 @ipld/is-circular

DownloadsWeekly Downloads

38

Version

1.0.3

License

MIT

Unpacked Size

6.25 kB

Total Files

8

Last publish

Collaborators

  • avatar
  • avatar
  • avatar