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

    111,713

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    6.03 kB

    Total Files

    8

    Last publish

    Collaborators

    • tjmehta