{"id":17001694,"url":"https://github.com/shresht7/case-convert","last_synced_at":"2025-08-02T13:38:56.890Z","repository":{"id":103221290,"uuid":"508334111","full_name":"Shresht7/case-convert","owner":"Shresht7","description":"Utility functions to determine and convert the case of strings.","archived":false,"fork":false,"pushed_at":"2025-01-21T20:54:39.000Z","size":55,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T09:09:45.929Z","etag":null,"topics":["string-case","string-manipulation"],"latest_commit_sha":null,"homepage":"","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/Shresht7.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-28T14:30:29.000Z","updated_at":"2022-06-28T17:16:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"cb94d108-024a-414d-be84-dffc25f61c56","html_url":"https://github.com/Shresht7/case-convert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Fcase-convert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Fcase-convert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Fcase-convert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Fcase-convert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shresht7","download_url":"https://codeload.github.com/Shresht7/case-convert/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244931588,"owners_count":20534011,"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":["string-case","string-manipulation"],"created_at":"2024-10-14T04:25:48.391Z","updated_at":"2025-03-22T08:48:35.260Z","avatar_url":"https://github.com/Shresht7.png","language":"TypeScript","readme":"# `case-convert`\n\nUtility functions to determine and convert the case of strings.\n\n## Usage\n\n```ts\nimport { toCamelCase } from 'case-convert'\n\nconst result = toCamelCase('a-new-hope')    //  aNewHope\n```\n\n## API Reference\n\n### `Case`\n\n```ts\nexport enum Case {\n    Camel = 'CAMEL',    //  camelCase\n    Snake = 'SNAKE',    //  snake_case\n    Kebab = 'KEBAB',    //  kebab-case\n    Title = 'TITLE',    //  TitleCase\n}\n```\n\n### `convert`\n\nConvert the string to the given case type\n\n```ts\nimport { Case, convert } from 'case-convert'\n\nconst result = convert('a-new-hope', Case.Camel)    //  aNewHope\n```\n\n### `check`\n\nCheck if the string is of the given case type\n\n```ts\nimport { check, Case } from 'case-convert'\n\ncheck('a-new-hope', Case.Camel)  //  false\ncheck('a_new_hope', Case.Snake)  //  true\n```\n\n### `determineCase`\n\nDetermine the case type of the string\n\n```ts\nimport { determineCase } from 'case-convert'\n\nconst result = determineCase('ANewHope')    //  Case.Title = \"TITLE\"\n```\n\n### `capitalize` and `uncapitalize`\n\nCapitalize or uncapitalize a string\n\n```ts\nimport { capitalize, uncapitalize } from 'case-convert'\n\ncapitalize('a new hope')    //  A new hope\nuncapitalize('A New Hope')  //  a New Hope\n```\n\n### `toCamelCase`, `toSnakeCase`, `toKebabCase` and `toTitleCase`\n\nConvert the string to the given format\n\n```ts\nimport { toCamelCase, toSnakeCase, toKebabCase, toTitleCase } from 'case-convert'\n\ntoCamelCase(\"some-string\")  //  someString\ntoSnakeCase(\"someString\")   //  some_string\ntoKebabCase(\"SomeString\")   //  some-string\ntoTitleCase(\"some_string\")  //  SomeString\n```\n\n---\n\n## 📑 License\n\nThis project is licensed under the [MIT License](./LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshresht7%2Fcase-convert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshresht7%2Fcase-convert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshresht7%2Fcase-convert/lists"}