Have ideas to improve npm?Join in the discussion! »

    @ipld/is-circular

    2.0.0 • 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

    235

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    7.73 kB

    Total Files

    8

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar