{"id":18075721,"url":"https://github.com/sajanv88/string-case-converter","last_synced_at":"2026-05-02T19:31:46.211Z","repository":{"id":260430105,"uuid":"881251401","full_name":"sajanv88/string-case-converter","owner":"sajanv88","description":"A flexible and customizable string case converter for JavaScript and TypeScript","archived":false,"fork":false,"pushed_at":"2024-10-31T08:58:44.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T23:50:34.413Z","etag":null,"topics":["deno","jsr","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/sajanv88.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":"2024-10-31T07:40:10.000Z","updated_at":"2024-10-31T09:47:01.000Z","dependencies_parsed_at":"2024-10-31T09:31:33.775Z","dependency_job_id":"c97b765e-8933-4263-bda3-90ed8e7f2b37","html_url":"https://github.com/sajanv88/string-case-converter","commit_stats":null,"previous_names":["sajanv88/string-case-converter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sajanv88/string-case-converter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajanv88%2Fstring-case-converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajanv88%2Fstring-case-converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajanv88%2Fstring-case-converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajanv88%2Fstring-case-converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sajanv88","download_url":"https://codeload.github.com/sajanv88/string-case-converter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajanv88%2Fstring-case-converter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32547645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T19:18:06.202Z","status":"ssl_error","status_checked_at":"2026-05-02T19:16:21.335Z","response_time":132,"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":["deno","jsr","typescript"],"created_at":"2024-10-31T11:07:04.009Z","updated_at":"2026-05-02T19:31:46.192Z","avatar_url":"https://github.com/sajanv88.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# String Case Converter\n\nA flexible and customizable string case converter for JavaScript and TypeScript that supports various case styles, including `camelCase`, `PascalCase`, `snake_case`, `kebab-case`, `CONSTANT_CASE`, and custom delimiter-based formats. The converter is also locale-aware, allowing accurate handling of accented characters and different language conventions.\n\n## Features\n\n- Convert strings to popular case styles like camelCase, PascalCase, snake_case, and more.\n- Custom delimiter support to create any case style you need.\n- Locale support for accurate transformations in non-English languages.\n- Lightweight and easy to use with clear, documented functions.\n\n\n```bash\n//  npm\nnpx jsr add @sajanv/string-case-converter\n\n// bun\nbunx jsr add @sajanv/string-case-converter\n\n// pnpm\npnpm dlx jsr add @sajanv/string-case-converter\n\n// deno\ndeno add jsr:@sajanv/string-case-converter\n\n```\n\n## Usage\nHere's a quick guide on how to use each function in this package.\n\n### Importing the Functions\nImport the functions you need from the package:\n\n```ts\nimport {\n  toCamelCase,\n  toPascalCase,\n  toSnakeCase,\n  toKebabCase,\n  toConstantCase,\n  toCustomCase,\n} from '@sajanv/string-case-converter';\n\n\ntoCamelCase(\"hello world example\"); // Output: \"helloWorldExample\"\ntoCamelCase(\"héllo wôrld éxample\", \"fr\"); // Output: \"hélloWôrldÉxample\"\n\ntoPascalCase(\"hello world example\"); // Output: \"HelloWorldExample\"\ntoPascalCase(\"héllo wôrld éxample\", \"fr\"); // Output: \"HélloWôrldÉxample\"\n\ntoSnakeCase(\"hello world example\"); // Output: \"hello_world_example\"\ntoSnakeCase(\"héllo wôrld éxample\", \"fr\"); // Output: \"héllo_wôrld_éxample\"\n\ntoKebabCase(\"hello world example\"); // Output: \"hello-world-example\"\ntoKebabCase(\"héllo wôrld éxample\", \"fr\"); // Output: \"héllo-wôrld-éxample\"\n\ntoConstantCase(\"hello world example\"); // Output: \"HELLO_WORLD_EXAMPLE\"\ntoConstantCase(\"héllo wôrld éxample\", \"fr\"); // Output: \"HÉLLO_WÔRLD_ÉXAMPLE\"\n\ntoCustomCase(\"hello world example\", \" \"); // Output: \"hello world example\"\ntoCustomCase(\"hello world example\", \" \", true); // Output: \"Hello World Example\"\ntoCustomCase(\"héllo wôrld éxample\", \"-\", true, \"fr\"); // Output: \"Héllo-Wôrld-Éxample\"\n\n\n```\n\n## Locale Support\nEach function accepts an optional locale parameter, which allows for locale-specific handling of accented characters and language conventions. By default, locale is set to English (en), but you can specify other locales as needed.\n\nFor example, to correctly handle French accents:\n\n```ts\ntoCamelCase(\"héllo wôrld éxample\", \"fr\"); // Output: \"hélloWôrldÉxample\"\n\n```\n\n## Testing\nThis package includes Deno tests to verify its functionality. To run the tests, use the following command:\n\n```ts\ndeno task dev\n```\n### Example output\n```bash\nTask dev deno test --watch mod_test.ts\nWatcher Test started.\nrunning 6 tests from ./mod_test.ts\ntoCamelCase should convert to camelCase ... ok (0ms)\ntoPascalCase should convert to PascalCase ... ok (0ms)\ntoSnakeCase should convert to snake_case ... ok (0ms)\ntoKebabCase should convert to kebab-case ... ok (0ms)\ntoConstantCase should convert to CONSTANT_CASE ... ok (0ms)\ntoCustomCase should convert to custom delimiter case ... ok (0ms)\n\nok | 6 passed | 0 failed (1ms)\n\nWatcher Test finished. Restarting on file change...\n\n```\n\n## Contributing\nContributions are welcome! Please feel free to submit a pull request with enhancements or bug fixes.\n\n- Fork the repository.\n   - Create a new branch for your feature or bug fix.\n   - Submit a pull request with a detailed description of the changes.\n   \n\n## License\nThis project is licensed under the\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsajanv88%2Fstring-case-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsajanv88%2Fstring-case-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsajanv88%2Fstring-case-converter/lists"}