{"id":19649128,"url":"https://github.com/toxic-johann/toxic-utils","last_synced_at":"2026-01-01T21:58:34.439Z","repository":{"id":57378431,"uuid":"95999794","full_name":"toxic-johann/toxic-utils","owner":"toxic-johann","description":"some utils function","archived":false,"fork":false,"pushed_at":"2020-06-02T18:16:30.000Z","size":340,"stargazers_count":1,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-02T01:12:04.816Z","etag":null,"topics":["deepassign","deepclone","utils"],"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/toxic-johann.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":"2017-07-02T03:19:38.000Z","updated_at":"2023-03-04T06:00:43.000Z","dependencies_parsed_at":"2022-09-26T16:41:30.006Z","dependency_job_id":null,"html_url":"https://github.com/toxic-johann/toxic-utils","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/toxic-johann/toxic-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toxic-johann%2Ftoxic-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toxic-johann%2Ftoxic-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toxic-johann%2Ftoxic-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toxic-johann%2Ftoxic-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toxic-johann","download_url":"https://codeload.github.com/toxic-johann/toxic-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toxic-johann%2Ftoxic-utils/sbom","scorecard":{"id":895815,"data":{"date":"2025-08-11","repo":{"name":"github.com/toxic-johann/toxic-utils","commit":"b4e4c00a65d6668900b104487999d37b417d9d08"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/19 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":"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":"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":"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":"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":"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":"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":"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":"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":"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 11 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"}}]},"last_synced_at":"2025-08-24T13:39:57.615Z","repository_id":57378431,"created_at":"2025-08-24T13:39:57.615Z","updated_at":"2025-08-24T13:39:57.615Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28164121,"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","status":"online","status_checked_at":"2026-01-01T02:00:06.694Z","response_time":59,"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":["deepassign","deepclone","utils"],"created_at":"2024-11-11T14:51:40.440Z","updated_at":"2026-01-01T21:58:34.411Z","avatar_url":"https://github.com/toxic-johann.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# toxic-utils\n\n[![Build Status](https://img.shields.io/travis/toxic-johann/toxic-utils/master.svg?style=flat-square)](https://travis-ci.org/toxic-johann/toxic-utils.svg?branch=master)\n[![Coverage Status](https://img.shields.io/coveralls/toxic-johann/toxic-utils/master.svg?style=flat-square)](https://coveralls.io/github/toxic-johann/toxic-utils?branch=master)\n[![npm](https://img.shields.io/npm/v/toxic-utils.svg?colorB=brightgreen\u0026style=flat-square)](https://www.npmjs.com/package/toxic-utils)\n[![dependency Status](https://david-dm.org/toxic-johann/toxic-utils.svg)](https://david-dm.org/toxic-johann/toxic-utils)\n[![devDependency Status](https://david-dm.org/toxic-johann/toxic-utils/dev-status.svg)](https://david-dm.org/toxic-johann/toxic-utils?type=dev) [![Greenkeeper badge](https://badges.greenkeeper.io/toxic-johann/toxic-utils.svg)](https://greenkeeper.io/)\n\nutils collection\n\n## get started\n\n```shell\nnpm install toxic-utils --save\n```\n\nif you are using `flow`, you should import our flow defination, by adding this to your `.flowconfig`.\n\n```ya\n[ignore]\n\n[include]\n\n[libs]\n./node_modules/toxic-utils/lib/index.flow.js\n[options]\n\n[lints]\n```\n\n## doc\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n### genTraversalHandler\n\n[src/index.js:8-20](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L8-L20 \"Source code on GitHub\")\n\nthe handler to generate an deep traversal handler\n\n**Parameters**\n\n-   `fn` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** the function you wanna run when you reach in the deep property\n\nReturns **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** the handler\n\n### deepClone\n\n[src/index.js:27-32](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L27-L32 \"Source code on GitHub\")\n\ndeeply clone an object\n\n**Parameters**\n\n-   `source` **([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) \\| [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object))** if you pass in other type, it will throw an error\n\nReturns **clone-target** the new Object\n\n### deepAssign\n\n[src/index.js:38-50](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L38-L50 \"Source code on GitHub\")\n\nmerge multiple objects\n\n**Parameters**\n\n-   `args` **...[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** [description]\n\nReturns **merge-object** [description]\n\n### camelize\n\n[src/index.js:57-63](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L57-L63 \"Source code on GitHub\")\n\ncamelize any string, e.g hello world -\u003e helloWorld\n\n**Parameters**\n\n-   `str` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** only accept string!\n-   `isBig` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** \n\nReturns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** camelize string\n\n### hypenate\n\n[src/index.js:69-71](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L69-L71 \"Source code on GitHub\")\n\nhypenate any string e.g hello world -\u003e hello-world\n\n**Parameters**\n\n-   `str` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** only accept string\n\nReturns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** \n\n### bind\n\n[src/index.js:78-90](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L78-L90 \"Source code on GitHub\")\n\nbind the function with some context. we have some fallback strategy here\n\n**Parameters**\n\n-   `fn` **[function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** the function which we need to bind the context on\n-   `context` **any** the context object\n\nReturns **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** \n\n### uuid\n\n[src/index.js:95-97](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L95-L97 \"Source code on GitHub\")\n\ngenerate an uuid\n\nReturns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** \n\n### S4\n\n[src/index.js:101-103](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L101-L103 \"Source code on GitHub\")\n\ngenerate an random number which length is 4\n\nReturns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** \n\n### rand\n\n[src/index.js:108-114](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L108-L114 \"Source code on GitHub\")\n\ngenerate an random number with specific length\n\n**Parameters**\n\n-   `length` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** \n\nReturns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** \n\n### getDeepProperty\n\n[src/index.js:119-147](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L119-L147 \"Source code on GitHub\")\n\nget an deep property\n\n**Parameters**\n\n-   `obj` **any** \n-   `keys` **([string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e)** \n-   `$2` **any**  (optional, default `{}`)\n    -   `$2.throwError`   (optional, default `false`)\n    -   `$2.backup`  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoxic-johann%2Ftoxic-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoxic-johann%2Ftoxic-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoxic-johann%2Ftoxic-utils/lists"}