{"id":15628331,"url":"https://github.com/jonschlinkert/clone-deep","last_synced_at":"2025-05-15T02:07:22.362Z","repository":{"id":27912619,"uuid":"31404539","full_name":"jonschlinkert/clone-deep","owner":"jonschlinkert","description":"Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives. Used by superstruct, merge-deep, and many others!","archived":false,"fork":false,"pushed_at":"2024-02-09T23:45:49.000Z","size":44,"stargazers_count":316,"open_issues_count":7,"forks_count":53,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-09T17:43:02.762Z","etag":null,"topics":["clone","clone-deep","copy","deep","deep-clone","deep-copy","javascript","jonschlinkert","js","node","nodejs","object"],"latest_commit_sha":null,"homepage":"https://github.com/jonschlinkert","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/jonschlinkert.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}},"created_at":"2015-02-27T05:13:07.000Z","updated_at":"2025-03-24T03:02:19.000Z","dependencies_parsed_at":"2024-06-18T12:14:38.822Z","dependency_job_id":"f5336216-1754-4612-bbcc-429ccd043614","html_url":"https://github.com/jonschlinkert/clone-deep","commit_stats":{"total_commits":49,"total_committers":3,"mean_commits":"16.333333333333332","dds":"0.061224489795918324","last_synced_commit":"fb63468c27c087349f67929b90441f09d64bed2f"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fclone-deep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fclone-deep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fclone-deep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fclone-deep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/clone-deep/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248659709,"owners_count":21141163,"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":["clone","clone-deep","copy","deep","deep-clone","deep-copy","javascript","jonschlinkert","js","node","nodejs","object"],"created_at":"2024-10-03T10:21:57.190Z","updated_at":"2025-04-13T23:55:21.215Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","readme":"# clone-deep [![NPM version](https://img.shields.io/npm/v/clone-deep.svg?style=flat)](https://www.npmjs.com/package/clone-deep) [![NPM monthly downloads](https://img.shields.io/npm/dm/clone-deep.svg?style=flat)](https://npmjs.org/package/clone-deep) [![NPM total downloads](https://img.shields.io/npm/dt/clone-deep.svg?style=flat)](https://npmjs.org/package/clone-deep)\n\n\n\u003e Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save clone-deep\n```\n\n## Sponsors\n\nThe following companies, organizations, and individuals support the ongoing maintenance and development of clone-deep. [Become a Sponsor](https://github.com/sponsors/jonschlinkert) to add your logo to this README, or any of [my other projects](https://github.com/jonschlinkert?tab=repositories\u0026q=\u0026type=\u0026language=\u0026sort=stargazers)\n\n### Gold Sponsors\n\n| [\u003cimg src=\"https://github.com/jonschlinkert/clone-deep/assets/383994/98036489-2cae-48a2-8d29-7dec58ea05c4\" alt=\"https://jaake.tech/\" width=\"100\"/\u003e](https://jaake.tech/) |\n|:---:|\n| [https://jaake.tech/](https://jaake.tech/) |\n\n## Usage\n\n```js\nconst cloneDeep = require('clone-deep');\n\nlet obj = { a: 'b' };\nlet arr = [obj];\nlet copy = cloneDeep(arr);\nobj.c = 'd';\n\nconsole.log(copy);\n//=\u003e [{ a: 'b' }]\n\nconsole.log(arr);\n//=\u003e [{ a: 'b', c: 'd' }]\n```\n\n## Heads up!\n\nThe last argument specifies whether or not to clone instances (objects that are from a custom class or are not created by the `Object` constructor. This value may be `true` or the function use for cloning instances.\n\nWhen an `instanceClone` function is provided, it will be invoked to clone objects that are not \"plain\" objects (as defined by [`isPlainObject`](#isPlainObject)). If `instanceClone` is not specified, this library will not attempt to clone non-plain objects, and will simply copy the object reference.\n\n## Attribution\n\nInitially based on [mout's](https://github.com/mout/mout) implementation of deepClone.\n\n## About\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/summary\u003e\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003eRunning Tests\u003c/strong\u003e\u003c/summary\u003e\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003eBuilding docs\u003c/strong\u003e\u003c/summary\u003e\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n\u003c/details\u003e\n\n### Related projects\n\nYou might also be interested in these projects:\n\n- [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor, or Object.create(null). | [homepage](https://github.com/jonschlinkert/is-plain-object \"Returns true if an object was created by the `Object` constructor, or Object.create(null).\")\n- [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject \"Returns true if the value is an object and not an array or null.\")\n- [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of \"Get the native type of a value.\")\n- [shallow-clone](https://www.npmjs.com/package/shallow-clone): Creates a shallow clone of any JavaScript value. | [homepage](https://github.com/jonschlinkert/shallow-clone \"Creates a shallow clone of any JavaScript value.\")\n\n### Contributors\n| **Commits** | **Contributor** |\n| --- | --- |\n| 49 | [jonschlinkert](https://github.com/jonschlinkert) |\n| 2  | [yujunlong2000](https://github.com/yujunlong2000) |\n\n### Author\n**Jon Schlinkert**\n+ [GitHub Profile](https://github.com/jonschlinkert)\n+ [Twitter Profile](https://twitter.com/jonschlinkert)\n+ [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n\n### License\nCopyright © 2023, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on July 12, 2023._\n\n","funding_links":["https://github.com/sponsors/jonschlinkert"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fclone-deep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Fclone-deep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fclone-deep/lists"}