Skip to content

NPM package - Use it for sanitising objects with circular refs.

Notifications You must be signed in to change notification settings

johnretsas/find-circular

Repository files navigation

find-circular

A utility to detect and handle circular references in objects.

Installation

npm install find-circular

Usage

import { findCircular } from "find-circular";

const obj = { a: 1 };
obj.self = obj;

console.log(findCircular(obj));
// Output: { a: 1, self: "[Circular]" }

GitHub Repository

You can find the source code and contribute to the project on GitHub:

GitHub

About

NPM package - Use it for sanitising objects with circular refs.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published