{"id":26926107,"url":"https://github.com/chnb128/oh-my-case","last_synced_at":"2025-04-02T03:31:37.214Z","repository":{"id":57313797,"uuid":"289355761","full_name":"CHNB128/oh-my-case","owner":"CHNB128","description":"Recursive case to case conversion","archived":false,"fork":false,"pushed_at":"2020-08-22T11:20:10.000Z","size":123,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T23:04:24.936Z","etag":null,"topics":["camel-case","camelcase","camelcase-keys-object","camelcase-to-snakecase","snake-case","snakecase","snakecase-keys-object","snakecase-to-camelcase"],"latest_commit_sha":null,"homepage":"","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/CHNB128.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}},"created_at":"2020-08-21T20:08:00.000Z","updated_at":"2020-08-22T11:20:12.000Z","dependencies_parsed_at":"2022-09-20T23:10:53.943Z","dependency_job_id":null,"html_url":"https://github.com/CHNB128/oh-my-case","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHNB128%2Foh-my-case","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHNB128%2Foh-my-case/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHNB128%2Foh-my-case/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHNB128%2Foh-my-case/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CHNB128","download_url":"https://codeload.github.com/CHNB128/oh-my-case/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246750727,"owners_count":20827773,"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":["camel-case","camelcase","camelcase-keys-object","camelcase-to-snakecase","snake-case","snakecase","snakecase-keys-object","snakecase-to-camelcase"],"created_at":"2025-04-02T03:30:31.636Z","updated_at":"2025-04-02T03:31:37.139Z","avatar_url":"https://github.com/CHNB128.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oh my cases\n\nLibrary to recursively convert any types from any cases to destination one\n\n## Install\n\nnpm\n\n```shell\nnpm install oh-my-cases\n```\n\nyarn\n\n```shell\nyarn add oh-my-cases\n```\n\n## Usage\n\n```js\nimport { snakeToCamel } from 'oh-my-cases'\n\nsnakeToCamel('snake_case') // =\u003e 'snakeCase'\nsnakeToCamel({'snake_case': 11}) // =\u003e {'snakeCase': 11}\n```\n\n## How to contribute\n\nTo add support for new case, just add two functions like `snakeStringtoCamel` and `snakeToCamel` into `index.js` and export function for case conversion.\nDon't forgot about tests.\n\nExample for `camelCase`:\n\n```js\n// index.js\n\nconst snakeStringToCamel = (value) =\u003e {\n  return value.replace(/_(\\w)/g, (m) =\u003e m[1].toUpperCase())\n}\n\nconst snakeToCamel = toCase(snakeStringToCamel)\n\nmodule.exports = {\n  // ...\n  snakeToCamel\n  // ...\n}\n```\n\nThen make a Pull Request and thanks to you for help grow open source :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchnb128%2Foh-my-case","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchnb128%2Foh-my-case","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchnb128%2Foh-my-case/lists"}