New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

just-is-circular

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

just-is-circular - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

index.js

@@ -38,5 +38,5 @@ module.exports = isCircular;

JSON.stringify(obj);
} catch(err) {
} catch (err) {
var index = errorKeywords.length;
while(index--) {
while (index--) {
if (err.message.indexOf(errorKeywords[index]) > -1) {

@@ -43,0 +43,0 @@ return true;

{
"name": "just-is-circular",
"version": "1.0.0",
"version": "1.0.1",
"description": "determine if an object contains a circular reference",

@@ -10,10 +10,3 @@ "main": "index.js",

"repository": "https://github.com/angus-c/just",
"keywords": [
"object",
"circular",
"reference",
"structure",
"no-dependencies",
"just"
],
"keywords": ["object", "circular", "reference", "structure", "no-dependencies", "just"],
"author": "Angus Croll",

@@ -20,0 +13,0 @@ "license": "MIT",

## just-is-circular
Part of a [library](../../../../) of zero-dependency npm modules that do just do one thing.
Part of a [library](../../../../) of zero-dependency npm modules that do just do
one thing.\
Guilt-free utilities for every occasion.

@@ -8,2 +9,4 @@

NOTE: not supported in IE or microsoft edge
```js

@@ -13,23 +16,23 @@ import isCircular from 'just-is-circular';

a.b = a;
isCircular(a) // true
isCircular(a); // true
const a = {};
a.b = {
c: a
}
isCircular(a) // true
c: a
};
isCircular(a); // true
const a = {};
a.b = {
c: 4
}
isCircular(a) // false
c: 4
};
isCircular(a); // false
const a = [];
a.push(a);
isCircular(a) // true
isCircular(a); // true
isCircular({}) // false
isCircular('hi') // false
isCircular(undefined) // false
isCircular({}); // false
isCircular('hi'); // false
isCircular(undefined); // false
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc