{"id":42475888,"url":"https://github.com/kbrabrand/camelize-ts","last_synced_at":"2026-01-28T10:17:41.348Z","repository":{"id":38311158,"uuid":"332598138","full_name":"kbrabrand/camelize-ts","owner":"kbrabrand","description":"A typescript typed camelCase function that recursively camel cases a snake cased object structure","archived":false,"fork":false,"pushed_at":"2025-04-14T19:49:36.000Z","size":455,"stargazers_count":31,"open_issues_count":9,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-22T09:26:13.400Z","etag":null,"topics":["camel-case","javascript","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/kbrabrand.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":"2021-01-25T01:29:13.000Z","updated_at":"2025-07-29T05:30:41.000Z","dependencies_parsed_at":"2023-01-28T14:47:36.705Z","dependency_job_id":"96e05eee-df69-4b79-96b4-b9de70c93ba6","html_url":"https://github.com/kbrabrand/camelize-ts","commit_stats":{"total_commits":60,"total_committers":5,"mean_commits":12.0,"dds":0.5833333333333333,"last_synced_commit":"14a56c64bcac63fa6e1175afbded65d643288db3"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/kbrabrand/camelize-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbrabrand%2Fcamelize-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbrabrand%2Fcamelize-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbrabrand%2Fcamelize-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbrabrand%2Fcamelize-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kbrabrand","download_url":"https://codeload.github.com/kbrabrand/camelize-ts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbrabrand%2Fcamelize-ts/sbom","scorecard":{"id":552633,"data":{"date":"2025-08-11","repo":{"name":"github.com/kbrabrand/camelize-ts","commit":"3d1f1d7747a22242efc9c93d5c23f080c76cd1f0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"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":"Code-Review","score":3,"reason":"Found 5/14 approved changesets -- score normalized to 3","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":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/kbrabrand/camelize-ts/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/kbrabrand/camelize-ts/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/kbrabrand/camelize-ts/main.yml/main?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"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":"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 '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 24 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":"14 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"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-20T11:19:27.689Z","repository_id":38311158,"created_at":"2025-08-20T11:19:27.689Z","updated_at":"2025-08-20T11:19:27.689Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28844011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T07:39:25.367Z","status":"ssl_error","status_checked_at":"2026-01-28T07:39:24.487Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["camel-case","javascript","typescript"],"created_at":"2026-01-28T10:17:39.726Z","updated_at":"2026-01-28T10:17:41.337Z","avatar_url":"https://github.com/kbrabrand.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"camelize-ts\n===\n[![CI](https://github.com/kbrabrand/camelize-ts/actions/workflows/main.yml/badge.svg)](https://github.com/kbrabrand/camelize-ts/actions/workflows/main.yml)\n\nA typescript typed camelCase function that recursively camel cases a snake cased or pascal cased object structure. It camel cases a simple string too, if you need that.\n\n`camelize-ts` is [`snakify-ts`](https://www.npmjs.com/package/snakify-ts)’ twin 👯.\n\n## Why do this again?\nThis has obviously been done before, and the \"new\" thing with this pacakge is not camel casing itself but the fact that it is a generic that, given the form of the input data structure, will provide you with typing for the returned object structure so that it fits with other types.\n\nAs an example I've been using it to camelize PostgreSQL rows (returned with snake case) before passing them to other functions in our GraphQL server (using camel cased property names).\n\n## Example\n```ts\nimport camelize from 'camelize-ts'\n\n// Expects camel case\nfunction nameIt({ \n  firstName, \n  lastName \n}: { \n  id: number, \n  firstName: string, \n  lastName: string, \n  roles: string[]\n}) { return `${firstName} ${lastName}` }\n\n// camel case snake_cased stuff from postgres\nconst camelizedUser = camelize({\n  id: 1,\n  first_name: 'Grim',\n  last_name: 'Reaper',\n  roles: ['user', 'admin']\n})\n\nconsole.log(JSON.stringify(camelizedUser, null, 2))\nconsole.log(nameIt(camelizedUser)\n```\n\noutput:\n\n```sh\n{\n  \"id\": 1,\n  \"firstName\": \"Grim\",\n  \"lastName\": \"Reaper\",\n  \"roles\": [\n    \"user\",\n    \"admin\"\n  ]\n}\n\nGrim Reaper\n```\n\nIt also converts pascal cased object fields to camel case.\n\n```ts\nimport camelize from 'camelize-ts'\n\nconst camelizedUser = camelize({\n  Id: 1,\n  first_name: 'Grim',\n  last_name: 'Reaper',\n  greetings: {\n    Morning: 'Good morning!',\n    Night: 'Good night!'\n  },\n  roles: ['user', 'admin'],\n  UpdatedAt: '2000-01-01T00:00:00.000Z'\n})\n\nconsole.log(JSON.stringify(camelizedUser, null, 2))\n```\n\noutput:\n\n```sh\n{\n  \"id\": 1,\n  \"firstName\": \"Grim\",\n  \"lastName\": \"Reaper\",\n  \"greetings\": {\n    \"morning\": \"Good morning!\",\n    \"night\": \"Good night!\"\n  },\n  \"roles\": [\n    \"user\",\n    \"admin\"\n  ],\n  \"updatedAt\": \"2000-01-01T00:00:00.000Z\"\n}\n```\n\n\n### Shallow option\nBy default camelize will traverse to the bottom of the object/array structure you pass. If you want to perform a shallow camelize, touching only the top level of the value you can pass true for the `shallow` option (second argument).\n\n### Type inference\nYou don't need to pass a type to `camelize` since it uses argument inference to find the type to convert. But if you need to, you can pass a type like this:\n\n```ts\ncamelize\u003c\n  // type of value to camelize\n  { first_name: string },\n\n  // whether or not to perform shallow camelization\n  true\n\u003e(\n  // value to camelize, type must match the specified type\n  value,\n\n  // shallow, must match what's set as the second type argument above (after the type)\n  true\n)\n```\n\n#### Type conversion\nIf you need to convert just a type, you can use the `Camelize` generic type to do this:\n\n```ts\nimport { Camelize } from 'camelize-ts'\n\ntype MySnakePerson = { first_name: string }\ntype MyCamelPerson = Camelize\u003cMySnakePerson\u003e\n```\n\n## Running tests\n```sh\nnpm run test // one time/CI\nnpm run test:watch // on each file change\n```\n\n## Licence\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbrabrand%2Fcamelize-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkbrabrand%2Fcamelize-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbrabrand%2Fcamelize-ts/lists"}