{"id":13432860,"url":"https://github.com/yyx990803/circular-json-es6","last_synced_at":"2025-04-23T14:19:05.776Z","repository":{"id":50362729,"uuid":"53164257","full_name":"yyx990803/circular-json-es6","owner":"yyx990803","description":"circular JSON.stringify and JSON.parse, for environments with native ES6 Map","archived":false,"fork":false,"pushed_at":"2018-06-08T03:39:33.000Z","size":9,"stargazers_count":130,"open_issues_count":1,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-23T14:18:56.140Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yyx990803.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-04T20:43:38.000Z","updated_at":"2025-03-16T15:08:57.000Z","dependencies_parsed_at":"2022-08-26T01:22:56.027Z","dependency_job_id":null,"html_url":"https://github.com/yyx990803/circular-json-es6","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yyx990803%2Fcircular-json-es6","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yyx990803%2Fcircular-json-es6/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yyx990803%2Fcircular-json-es6/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yyx990803%2Fcircular-json-es6/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yyx990803","download_url":"https://codeload.github.com/yyx990803/circular-json-es6/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250447982,"owners_count":21432166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T02:01:17.684Z","updated_at":"2025-04-23T14:19:05.750Z","avatar_url":"https://github.com/yyx990803.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# circular-json-es6\n\nA replacement for `JSON.stringify` and `JSON.parse` that can handle circular references (persists reference structure).\n\n**This implementation requires environments with native ES6 Map support,** but is decently faster than [circular-json](https://github.com/WebReflection/circular-json) (see benchmark with `npm run bench`).\n\n``` js\nvar CircularJSON = require('circular-json-es6')\n\nvar obj = {}\nobj.a = obj\n\nvar clone = CircularJSON.parse(CircularJSON.stringify(obj))\n\nclone.a === clone // -\u003e true\n```\n\n### NOTE\n\nThe default `stringify` method optimizes for cases where no circular reference is present by trying a plain `JSON.stringify` first. This means if no circular references are found in the data then it will not persist multiple (but non-circular) references to the same object.\n\nIf you want to enforce reference persistence, use `CircularJSON.stringifyStrict` instead.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyyx990803%2Fcircular-json-es6","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyyx990803%2Fcircular-json-es6","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyyx990803%2Fcircular-json-es6/lists"}