{"id":27264226,"url":"https://github.com/ritik97/clonify","last_synced_at":"2026-04-12T17:51:19.697Z","repository":{"id":287186808,"uuid":"963878954","full_name":"Ritik97/clonify","owner":"Ritik97","description":"A lightweight and reliable deep cloning utility for objects, arrays, maps, sets, and more – with full TypeScript support.","archived":false,"fork":false,"pushed_at":"2025-04-10T12:13:28.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T07:07:18.069Z","etag":null,"topics":["deep-clone","javascript","npm-package","object-clone","open-source","typescript","utility"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Ritik97.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-10T10:55:34.000Z","updated_at":"2025-04-10T12:13:32.000Z","dependencies_parsed_at":"2025-04-11T06:52:21.221Z","dependency_job_id":"67c04c4a-6ce6-4e80-8d46-87b9ee0e8b27","html_url":"https://github.com/Ritik97/clonify","commit_stats":null,"previous_names":["ritik97/clonify"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Ritik97/clonify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ritik97%2Fclonify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ritik97%2Fclonify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ritik97%2Fclonify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ritik97%2Fclonify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ritik97","download_url":"https://codeload.github.com/Ritik97/clonify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ritik97%2Fclonify/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262620638,"owners_count":23338523,"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":["deep-clone","javascript","npm-package","object-clone","open-source","typescript","utility"],"created_at":"2025-04-11T06:52:15.262Z","updated_at":"2026-04-12T17:51:19.564Z","avatar_url":"https://github.com/Ritik97.png","language":"TypeScript","readme":"![npm](https://img.shields.io/npm/v/clonify?cacheSeconds=10)\n![License](https://img.shields.io/github/license/Ritik97/clonify)\n\n\n# Clonify\n\n\u003e A lightweight and reliable deep cloning utility for JavaScript and TypeScript.\n\n**Clonify** is a zero-dependency deep cloning function that handles objects, arrays, maps, sets, dates, regex, symbols, and custom class instances. It also supports circular references.\n\n---\n\n## ✨ Features\n\n- 🔁 Deep clones complex nested structures  \n- 🔒 Handles circular references safely  \n- 🧠 Clones Maps, Sets, Dates, Regex, Symbols  \n- 💎 Preserves prototypes of custom class instances  \n- 🧾 Full TypeScript support  \n\n---\n\n## 📦 Installation\n\n```bash\nnpm install clonify\n```\n\n---\n\n## 🚀 Usage\n\n```ts\nimport { clonify } from 'clonify'\n\nclass User {\n  constructor(public name: string) {}\n}\n\nconst original = {\n  user: new User(\"Ritik\"),\n  numbers: [1, 2, 3],\n  meta: new Map([[\"key\", \"value\"]]),\n}\n\noriginal.self = original // circular reference\n\nconst copy = clonify(original)\n\nconsole.log(copy)\n```\n\n---\n\n## 📚 API\n\n### `clonify(value: any): any`\nPerforms a deep clone of the provided value, supporting all standard JavaScript data structures.\n\n---\n\n## 🧪 Supported Types\n\n- Objects (POJOs and class instances)\n\n- Arrays\n\n- Maps\n\n- Sets\n\n- Dates\n\n- RegExps\n\n- Symbols (as keys and values)\n\n- Circular references\n\n---\n\n## 📘 License\n\nMIT © [Ritik](https://github.com/Ritik97)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fritik97%2Fclonify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fritik97%2Fclonify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fritik97%2Fclonify/lists"}