JSPM

@ipld/is-circular

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 31
  • Score
    100M100P100Q70622F
  • License MIT

high-performance, zero-dependency circular reference check for objects (or arrays)

Package Exports

  • @ipld/is-circular

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ipld/is-circular) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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