{"id":18396703,"url":"https://github.com/igorskyflyer/npm-clone-js","last_synced_at":"2026-02-27T06:06:25.217Z","repository":{"id":51118609,"uuid":"215422900","full_name":"igorskyflyer/npm-clone-js","owner":"igorskyflyer","description":"🧬 A NPM wrapper around a lightweight JavaScript utility allowing deep copy-by-value of nested objects, arrays and arrays of objects. 🪁","archived":false,"fork":false,"pushed_at":"2025-08-27T23:38:11.000Z","size":621,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T23:19:33.860Z","etag":null,"topics":["array","back-end","biome","clone","clonejs","igorskyflyer","javascript","js","nested-objects","node","nodejs","npm","object","package","typescript","vitest","wrapper"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@igorskyflyer/clone","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/igorskyflyer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"ko_fi":"igorskyflyer"}},"created_at":"2019-10-16T00:38:47.000Z","updated_at":"2025-08-27T23:38:06.000Z","dependencies_parsed_at":"2025-08-28T01:11:35.896Z","dependency_job_id":"124c3f86-2ec1-493f-8d32-d37ca6b0f8ca","html_url":"https://github.com/igorskyflyer/npm-clone-js","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/igorskyflyer/npm-clone-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorskyflyer%2Fnpm-clone-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorskyflyer%2Fnpm-clone-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorskyflyer%2Fnpm-clone-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorskyflyer%2Fnpm-clone-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igorskyflyer","download_url":"https://codeload.github.com/igorskyflyer/npm-clone-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorskyflyer%2Fnpm-clone-js/sbom","scorecard":{"id":482795,"data":{"date":"2025-08-11","repo":{"name":"github.com/igorskyflyer/npm-clone-js","commit":"760ee55475572215d463ea51d71a61cc02e44c6d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-64vr-g452-qvp3","Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx","Warn: Project is vulnerable to: GHSA-vg6x-rcgg-rjx6","Warn: Project is vulnerable to: GHSA-x574-m823-4x7w","Warn: Project is vulnerable to: GHSA-4r4m-qw57-chr8","Warn: Project is vulnerable to: GHSA-xcj6-pq6g-qj4x","Warn: Project is vulnerable to: GHSA-356w-63v5-8wf4","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3","Warn: Project is vulnerable to: GHSA-9crc-q9x8-hgqq"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T17:02:30.822Z","repository_id":51118609,"created_at":"2025-08-19T17:02:30.823Z","updated_at":"2025-08-19T17:02:30.823Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29887018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T05:38:26.446Z","status":"ssl_error","status_checked_at":"2026-02-27T05:38:25.235Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["array","back-end","biome","clone","clonejs","igorskyflyer","javascript","js","nested-objects","node","nodejs","npm","object","package","typescript","vitest","wrapper"],"created_at":"2024-11-06T02:14:37.143Z","updated_at":"2026-02-27T06:06:25.211Z","avatar_url":"https://github.com/igorskyflyer.png","language":"TypeScript","funding_links":["https://ko-fi.com/igorskyflyer"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/igorskyflyer/npm-clone-js/main/media/clone.js.png\" alt=\"Icon of clone.js\" width=\"256\" height=\"256\"\u003e\n  \u003ch1\u003eclone.js\u003c/h1\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003ch4 align=\"center\"\u003e\n  🧬 A lightweight JavaScript utility allowing deep copy-by-value of nested objects, arrays and arrays of objects. 🪁\n\u003c/h4\u003e\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## 📃 Table of Contents\n\n- [Features](#-features)\n- [Usage](#-usage)\n- [API](#-api)\n- [Changelog](#-changelog)\n- [Support](#-support)\n- [License](#-license)\n- [Related](#-related)\n- [Author](#-author)\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## 🤖 Features\n\n- 🧬 Deep‑clones objects and arrays with full fidelity\n- 🔁 Recursively copies nested structures without mutation\n- 🛡️ Preserves original data while enabling safe edits\n- 🧠 Smart handling of null and non‑object values\n- 🧩 Works with mixed arrays, primitives, and objects\n- ⚙️ Zero dependencies - drop‑in and lightweight\n- 🚀 Ideal for state snapshots, undo systems, or sandboxing\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## 🕵🏼 Usage\n\nInstall it by executing any of the following, depending on your preferred package manager:\n\n```bash\npnpm add @igorskyflyer/clone\n```\n\n```bash\nyarn add @igorskyflyer/clone\n```\n\n```bash\nnpm i @igorskyflyer/clone\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## 🤹🏼 API\n\n### Simple array copy\n\n```javascript\nimport { clone } from '@igorskyflyer/clone'\n\nconst firstArray = [1, 2, 3]\nconst secondArray = clone(firstArray)\n\nsecondArray[0] = 5\n\nconsole.log('firstArray =\u003e ', firstArray) // [1, 2, 3]\nconsole.log('secondArray =\u003e ', secondArray) // [5, 2, 3]\n```\n\n### Complex array (array of objects)\n\n```javascript\nimport { clone } from '@igorskyflyer/clone'\n\nconst firstArray = [\n  {\n    id: '103',\n    name: 'Peter',\n  },\n  {\n    id: '214',\n    name: 'Eve',\n  },\n]\nconst secondArray = clone(firstArray)\n\nsecondArray[0].name = 'John'\n\nconsole.log('firstArray =\u003e ', firstArray)\nconsole.log('secondArray =\u003e ', secondArray)\n```\n\n### Simple object copy\n\n```javascript\nimport { clone } from '@igorskyflyer/clone'\n\nconst firstStudent = {\n  id: 103,\n  name: 'Ben',\n  classes: ['Maths', 'Science', 'English language'],\n}\n\nconst secondStudent = clone(firstStudent)\n\nsecondStudent.classes[0] = 'Psychology'\n\nconsole.log('firstStudent =\u003e ', firstStudent)\nconsole.log('secondStudent =\u003e ', secondStudent)\n```\n\n### Nested object copy\n\n```javascript\nimport { clone } from '@igorskyflyer/clone'\n\nconst firstStudent = {\n  id: 103,\n  name: 'Ben',\n  subjects: {\n    groupDke: {\n      science: 'B',\n      maths: 'C',\n    },\n    groupOpe: {\n      foo: 'bar',\n    },\n  },\n}\n\nconst secondStudent = clone(firstStudent)\n\nsecondStudent.subjects.groupDke.maths = 'B'\n\nconsole.log('firstStudent =\u003e ', firstStudent)\nconsole.log('secondStudent =\u003e ', secondStudent)\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## 📝 Changelog\n\n📑 The changelog is available here, [CHANGELOG.md](https://github.com/igorskyflyer/npm-clone-js/blob/main/CHANGELOG.md).\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## 🪪 License\n\nLicensed under the MIT license which is available here, [MIT license](https://github.com/igorskyflyer/npm-clone-js/blob/main/LICENSE).\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## 💖 Support\n\n\u003cdiv align=\"center\"\u003e\n  I work hard for every project, including this one and your support means a lot to me!\n  \u003cbr\u003e\n  Consider buying me a coffee. ☕\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://ko-fi.com/igorskyflyer\" target=\"_blank\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/igorskyflyer/igorskyflyer/main/assets/ko-fi.png\" alt=\"Donate to igorskyflyer\" width=\"180\" height=\"46\"\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \u003cem\u003eThank you for supporting my efforts!\u003c/em\u003e 🙏😊\n\u003c/div\u003e\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## 🧬 Related\n\n[@igorskyflyer/pathexists](https://www.npmjs.com/package/@igorskyflyer/pathexists)\n\n\u003e _🧲 Provides ways of properly checking if a path exists inside a given array of files/directories both on Windows and UNIX-like operating systems. 🗺_\n\n[@igorskyflyer/zep](https://www.npmjs.com/package/@igorskyflyer/zep)\n\n\u003e _🧠 Zep is a zero-dependency, efficient debounce module. ⏰_\n\n[@igorskyflyer/valid-path](https://www.npmjs.com/package/@igorskyflyer/valid-path)\n\n\u003e _🧰 Provides ways of testing whether a given value can be a valid file/directory name. 🏜_\n\n[@igorskyflyer/my-file-path](https://www.npmjs.com/package/@igorskyflyer/my-file-path)\n\n\u003e _🌟 An npm module that strongly types file paths! 🥊_\n\n[@igorskyflyer/recursive-readdir](https://www.npmjs.com/package/@igorskyflyer/recursive-readdir)\n\n\u003e _📖 Provides recursive readdir() and readdirSync() functions. 📁_\n\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\n## 👨🏻‍💻 Author\nCreated by **Igor Dimitrijević** ([*@igorskyflyer*](https://github.com/igorskyflyer/)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorskyflyer%2Fnpm-clone-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figorskyflyer%2Fnpm-clone-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorskyflyer%2Fnpm-clone-js/lists"}