{"_id":"decircular","_rev":"2-f53a061bf635d933baff3118a6312d22","name":"decircular","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"decircular","version":"0.1.0","description":"Remove circular references from objects","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/decircular.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","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","gitHead":"5321c50c3953dc53433597e6e04d9be5f3f9b302","bugs":{"url":"https://github.com/sindresorhus/decircular/issues"},"homepage":"https://github.com/sindresorhus/decircular#readme","_id":"decircular@0.1.0","_nodeVersion":"18.18.2","_npmVersion":"9.2.0","dist":{"integrity":"sha512-rlkV/bf/JHhz16W3W3cywWwrukO4aKKSX7k3IQvvCz9kNnKWHm67ESyYsSN/3U4+Luti3npxj7NE5Oe6+7UyrQ==","shasum":"1f4979924420bc50337823c640393fa55b660868","tarball":"https://registry.npmjs.org/decircular/-/decircular-0.1.0.tgz","fileCount":5,"unpackedSize":4102,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBC0fKNJXIuDwYajoHNh9YGQWxrArBa7FZnOTzqfjpVOAiBGbQfUpUQuPTLv+MmHUBRwRy1WKbx7xhpWEHZwTXpjZg=="}]},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/decircular_0.1.0_1699990296988_0.6661066866126408"},"_hasShrinkwrap":false},"0.1.1":{"name":"decircular","version":"0.1.1","description":"Remove circular references from objects","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/decircular.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","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","gitHead":"a0cbc89f396fd5dca9af99c2c57f738a98059ce8","bugs":{"url":"https://github.com/sindresorhus/decircular/issues"},"homepage":"https://github.com/sindresorhus/decircular#readme","_id":"decircular@0.1.1","_nodeVersion":"20.9.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-V2Vy+QYSXdgxRPmOZKQWCDf1KQNTUP/Eqswv/3W20gz7+6GB1HTosNrWqK3PqstVpFw/Dd/cGTmXSTKPeOiGVg==","shasum":"ace23ca95e24d036acb05702ba80cd17bebc155f","tarball":"https://registry.npmjs.org/decircular/-/decircular-0.1.1.tgz","fileCount":5,"unpackedSize":4136,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBFg5hezX3FKWLH64IstOnATmFmeuUuclGDX6/VZiuUwAiEA+cwG1xoN40aHr9PbdoigiyRSio6IuvyYekpzsjPsGmM="}]},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/decircular_0.1.1_1700229915036_0.6837520416079979"},"_hasShrinkwrap":false},"1.0.0":{"name":"decircular","version":"1.0.0","description":"Remove circular references from objects","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/decircular.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","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","gitHead":"0c4f404ed2e57de49fd936b5bf7d168046d41740","bugs":{"url":"https://github.com/sindresorhus/decircular/issues"},"homepage":"https://github.com/sindresorhus/decircular#readme","_id":"decircular@1.0.0","_nodeVersion":"18.19.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-YhCtYW0jQs9+gzL2vDLxanRhMHeKa55kw5z2oheI6D+MQA7KafrqtiGKhhpKCLZQurm2a9h0LkP9T5z5gy+A0A==","shasum":"1800247fe790307cb8f63b76de9ac4c036d01ad0","tarball":"https://registry.npmjs.org/decircular/-/decircular-1.0.0.tgz","fileCount":5,"unpackedSize":4136,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBivO68GdRrXK77Cr/xn1qtIkiKPapV+rKfyIL1GvEdwIgTnfWuKJ/GLQ4h8bC38mwGUPvmDsekpaxQt79+lLrlwg="}]},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/decircular_1.0.0_1710093820191_0.8357078268207261"},"_hasShrinkwrap":false}},"time":{"created":"2023-11-14T19:31:36.987Z","0.1.0":"2023-11-14T19:31:37.146Z","modified":"2024-03-10T18:03:40.794Z","0.1.1":"2023-11-17T14:05:15.261Z","1.0.0":"2024-03-10T18:03:40.361Z"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"description":"Remove circular references from objects","homepage":"https://github.com/sindresorhus/decircular#readme","keywords":["circular","object","destroy","remove","reference","ref","copy","array","serialization","json","stringify","cyclic"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/decircular.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"bugs":{"url":"https://github.com/sindresorhus/decircular/issues"},"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","readmeFilename":"readme.md"}