{"_id":"@cjser/decircular__v0_1_1","name":"@cjser/decircular__v0_1_1","dist-tags":{"latest":"0.1.1-cjser.2"},"versions":{"0.1.1-cjser.2":{"name":"@cjser/decircular__v0_1_1","version":"0.1.1-cjser.2","description":"Remove circular references from objects","license":"MIT","repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","require":"./dist-cjser/index.cjs","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsc index.d.ts"},"keywords":["circular","object","destroy","remove","reference","ref","copy","array","serialization","json","stringify","cyclic"],"devDependencies":{"ava":"^5.3.1","typescript":"^5.2.2","xo":"^0.56.0"},"types":"./index.d.ts","main":"./dist-cjser/index.cjs","cjser":{"sourceVersion":"0.1.1","cjserVersion":2,"original":{"name":"decircular","version":"0.1.1","exports":{"types":"./index.d.ts","default":"./index.js"},"repository":"sindresorhus/decircular","files":["index.js","index.d.ts"],"scripts":{"test":"xo && ava && tsc index.d.ts"}}},"_id":"@cjser/decircular__v0_1_1@0.1.1-cjser.2","gitHead":"a4bef54d7d22d3d9a6b84528457938d84cd65fe7","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-5WITPyCWSpwIhlFcqIZq3J8W+C8dTMD6GViJRm5uJFB4BqrW+TZIvth/0E9h4pXgbl5KgSxLV/wKCHRuyxS4VQ==","shasum":"253e94129ceb9d403094d2f08210c0b93f030aa5","tarball":"https://registry.npmjs.org/@cjser/decircular__v0_1_1/-/decircular__v0_1_1-0.1.1-cjser.2.tgz","fileCount":6,"unpackedSize":6801,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCtU1W8NWT17PDRGx5h7viAQxn1zdvPYhlwi/AdRx885AIhAJIByf/GCehP5O4ebOLSeHQdX2luB7wdt3uLsHZebhmL"}]},"_npmUser":{"name":"nanahira","email":"nanahira@momobako.com"},"directories":{},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/decircular__v0_1_1_0.1.1-cjser.2_1778157815945_0.41222847146111397"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-07T12:43:35.855Z","0.1.1-cjser.2":"2026-05-07T12:43:36.087Z","modified":"2026-05-07T12:43:36.287Z"},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"description":"Remove circular references from objects","keywords":["circular","object","destroy","remove","reference","ref","copy","array","serialization","json","stringify","cyclic"],"repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","readme":"# decircular\n\n> Remove circular references from objects\n\nCircular references occur in JavaScript when an object references itself or creates a loop of references involving other objects. This can lead to issues like infinite loops and errors during serialization (e.g., with `JSON.stringify`). This package replaces circular references in objects or arrays with clear path notations (e.g., `[Circular *a.1.b]`). Ideal for data serialization, debugging, and logging.\n\n## Install\n\n```sh\nnpm install decircular\n```\n\n## Usage\n\n```js\nimport decircular from 'decircular';\n\nconst object = {\n\ta: 1,\n\tb: {\n\t\tc: 2\n\t}\n};\n\nobject.b.d = object.b; // Creates a circular reference\n\nconsole.log(decircular(object));\n/*\n{\n\ta: 1,\n\tb: {\n\t\tc: 2,\n\t\td: '[Circular *b]'\n\t}\n}\n*/\n```\n\n## API\n\n### decircular(object)\n\nReturns a deep copy of the given object or array with circular references removed.\n\n## Related\n\n- [safe-stringify](https://github.com/sindresorhus/safe-stringify) - Serialize objects to JSON with handling for circular references\n\n## cjser\n\nThis package is a CommonJS-compatible build generated by cjser for projects that still need `require()` support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.\nOriginal repository: https://github.com/sindresorhus/decircular\n","readmeFilename":"readme.md","_rev":"1-fb3c28184af9822d7e41dbf8f0ca0cbd"}