{"id":20046354,"url":"https://github.com/aneldev/dyna-stringify","last_synced_at":"2025-07-01T16:05:38.125Z","repository":{"id":39228662,"uuid":"240201929","full_name":"aneldev/dyna-stringify","owner":"aneldev","description":"Stringify object with circular references with custom text.","archived":false,"fork":false,"pushed_at":"2022-12-12T01:49:25.000Z","size":4016,"stargazers_count":0,"open_issues_count":23,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-21T18:05:35.994Z","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/aneldev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-13T07:30:34.000Z","updated_at":"2020-02-13T07:32:59.000Z","dependencies_parsed_at":"2023-01-27T10:16:13.677Z","dependency_job_id":null,"html_url":"https://github.com/aneldev/dyna-stringify","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/aneldev/dyna-stringify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneldev%2Fdyna-stringify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneldev%2Fdyna-stringify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneldev%2Fdyna-stringify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneldev%2Fdyna-stringify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aneldev","download_url":"https://codeload.github.com/aneldev/dyna-stringify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneldev%2Fdyna-stringify/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261170427,"owners_count":23119513,"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-11-13T11:23:16.854Z","updated_at":"2025-06-21T18:05:49.045Z","avatar_url":"https://github.com/aneldev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\nStringify object with circular references.\n\n\n# Usage\n```\n// Minimal usage\ndynaStringify(value);\ndynaStringify(value, {spaces: 2});\ndynaStringify(value, {spaces: 2, circularText: '!REF'});\n\n// Extensive with callback for the reference text\ndynaStringify(\n  value, \n  {\n    spaces: 2, \n    circularText: value =\u003e { \n      if (value.customerId) return `!RefCustId:${value.customerId}`; \n      return '!Ref',\n    }\n   }\n);\n```\n\n# Syntax\n_In Typescript_\n```\n dynaStringify = (\n  value: any,\n  options?: {\n    spaces?: number;\n    circularText?: string | ((value: any) =\u003e string);\n  },\n): string;\n```\n\n# Example\n```\nconst value = {\n      name: 'John',\n      age: 32,\n      cars: ['VW', 'Plymouth'],\n    };\nvalue.cars.push(value);\n```\nThe\n`dynaStringify(value, {spaces: 2})`\n\nreturns\n```\n{\n  \"name\": \"John\",\n  \"age\": 32,\n  \"cars\": [\n    \"VW\",\n    \"Plymouth\",\n    \"[CircularRef]\"\n  ]\n}\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faneldev%2Fdyna-stringify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faneldev%2Fdyna-stringify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faneldev%2Fdyna-stringify/lists"}