Need private packages and team management tools?Check out npm Teams »

just-is-circular

1.1.0 • Public • Published

just-is-circular

Part of a library of zero-dependency npm modules that do just do one thing.
Guilt-free utilities for every occasion.

Try it now

NOTE: not supported in IE or microsoft edge

import isCircular from 'just-is-circular';
const a = {};
a.b = a;
isCircular(a); // true
 
const a = {};
a.b = {
  c: a
};
isCircular(a); // true
 
const a = {};
a.b = {
  c: 4
};
isCircular(a); // false
 
const a = [];
a.push(a);
isCircular(a); // true
 
isCircular({}); // false
isCircular('hi'); // false
isCircular(undefined); // false

Install

npm i just-is-circular

DownloadsWeekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

2.98 kB

Total Files

4

Last publish

Collaborators

  • avatar