{"id":20145739,"url":"https://github.com/obsius/quick-deep-clone","last_synced_at":"2026-06-08T17:32:03.204Z","repository":{"id":137407969,"uuid":"222062669","full_name":"obsius/quick-deep-clone","owner":"obsius","description":"Quick deep cloning for JS.","archived":false,"fork":false,"pushed_at":"2020-02-05T01:18:30.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-10T09:39:03.120Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/obsius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-11-16T07:22:14.000Z","updated_at":"2020-02-05T01:18:33.000Z","dependencies_parsed_at":"2023-05-29T04:00:38.713Z","dependency_job_id":null,"html_url":"https://github.com/obsius/quick-deep-clone","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/obsius/quick-deep-clone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obsius%2Fquick-deep-clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obsius%2Fquick-deep-clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obsius%2Fquick-deep-clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obsius%2Fquick-deep-clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/obsius","download_url":"https://codeload.github.com/obsius/quick-deep-clone/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obsius%2Fquick-deep-clone/sbom","scorecard":{"id":701248,"data":{"date":"2025-08-11","repo":{"name":"github.com/obsius/quick-deep-clone","commit":"f96e13cc9335e7490f9f67f7776374472b44cd3a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/9 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":"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":"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":"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":"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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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"}}]},"last_synced_at":"2025-08-22T05:15:35.433Z","repository_id":137407969,"created_at":"2025-08-22T05:15:35.433Z","updated_at":"2025-08-22T05:15:35.433Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34073747,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-13T22:17:52.672Z","updated_at":"2026-06-08T17:32:03.187Z","avatar_url":"https://github.com/obsius.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quick Deep Clone (qdclone)\n\nQuick deep cloning for JavaScript.  \n\nUnsafe for use on cyclical data structures. Does not copy functions as object properties.\n\n## Usage\n\nPass an object to clone as the first argument.  \nPass true as the second argument to construct prototypes, empty or false to instantiate as plain objects.\n\n*Performance comes at a cost:*\n- no cyclic objects\n- no protos that require arguments on construction (if `cast` flag is `true`)\n- no objects that shadow global proto properties\n- no polluted base prototypes\n\n```js\nclone(obj, cast = false)\n```\n\n## Example\n\n```js\nconst qdclone = require('quick-deep-clone');\n\nlet x = {\n\tstr: 'str',\n\tnum: 10,\n\tarr: [0, 1, 2]\n};\n\nfunction A() {\n\tthis.str = 'str';\n\tthis.num = 10;\n\tthis.arr = [0, 1, 2];\n}\n\n// deep clone a plain object\nconsole.log(qdclone(x));\n\n// deep clone a prototyped object\nconsole.log(qdclone(new A(), true));\n\n// deep clone a prototyped object as a plain object\nconsole.log(qdclone(new A(), false));\n```\n\n## Benchmarks\n\nPackage | Time (ms)\n-|-\ndeep-clone@3.0.3 | 1361\nrfdc@1.1.4 | 1048\nqdclone | 441\nqdclone (*\\* with casting*) | 525\n\n*\\* only `quick-deep-clone` supports casting prototypes*\n\n```js\nconst { performance } = require('perf_hooks');\n\nconst cloners = {\n\t'deep-clone': require('deep-clone'),\n\t'rfdc': require('rfdc')(),\n\t'qdclone': require('quick-deep-clone')\n};\n\nconst ITERATIONS = 10000;\n\nsetImmediate(() =\u003e {\n\n\tlet x = makeX();\n\t\n\tconsole.log('\\nRunning...\\n')\n\n\trunBench('deep-clone', x, ITERATIONS);\n\trunBench('rfdc', x, ITERATIONS);\n\trunBench('qdclone', x, ITERATIONS);\n\t\n\tconsole.log('Running with prototype casting (only supported by qdclone)...\\n');\n\n\trunBench('qdclone', x, ITERATIONS, true);\n});\n\nfunction runBench(type, obj, iterations, ...args) {\n\t\n\tlet cloned;\n\n\tconsole.log(`Clone via ${type}...`);\n\t\n\tlet benchStart = performance.now();\n\n\tfor (let i = 0; i \u003c iterations; ++i) {\n\t\tcloned = cloners[type](obj, ...args);\n\t}\n\n\tconsole.log(`${performance.now() - benchStart} ms\\n`);\n\n\treturn cloned;\n}\n\nfunction makeX() {\n\n\tlet x = {\n\t\tstr: 'str',\n\t\tnum: 10,\n\t\tarr: [0, 1, 2],\n\t\tdate: new Date(),\n\t\tbool: false,\n\t\tsub: {\n\t\t\tstr2: 'abcdefghijklmnopqrstuvwxyz',\n\t\t\tnum2: 9999999.9999999,\n\t\t\tbool2: true,\n\t\t\tarr2: [-.0000001, true, 'asdf', 100000.00001, [1, 2, 3], 'loooooooooooong']\n\t\t}\n\t};\n\n\tlet x2 = {\n\t\tx: JSON.parse(JSON.stringify(x))\n\t};\n\n\tlet x3 = {\n\t\tx: JSON.parse(JSON.stringify(x)),\n\t\tx2: JSON.parse(JSON.stringify(x2))\n\t};\n\n\tlet xs = [];\n\n\tfor (let i = 0; i \u003c 100; ++i) {\n\t\txs.push(JSON.parse(JSON.stringify(x)));\n\t}\n\n\treturn new class X {\n\t\tconstructor() {\n\t\t\tthis.x = x;\n\t\t\tthis.x2 = x2;\n\t\t\tthis.x3 = x3;\n\t\t\tthis.xs = xs;\n\t\t}\n\t}\n}\n```\n\n## Contributing\nFeel free to make changes and submit pull requests whenever.\n\n\n## License\nMousetouch uses the [MIT](https://opensource.org/licenses/MIT) license.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobsius%2Fquick-deep-clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobsius%2Fquick-deep-clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobsius%2Fquick-deep-clone/lists"}