{"id":15673189,"url":"https://github.com/jonschlinkert/detect-case","last_synced_at":"2025-05-06T22:25:03.185Z","repository":{"id":65990669,"uuid":"340320678","full_name":"jonschlinkert/detect-case","owner":"jonschlinkert","description":"Detects the casing of the input string (camelcase, lowercase, snakecase, kebabcase, snakecase, uppercase etc).","archived":false,"fork":false,"pushed_at":"2025-01-27T00:35:26.000Z","size":53,"stargazers_count":18,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-25T00:03:08.737Z","etag":null,"topics":["camel-case","camelcase","capitalized","casing","casing-change","change-case","dash-case","kebab-case","kebabcase","lowercase","pascalcase","sentencecase","snake-case","snakecase","titlecase","uppercase"],"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/jonschlinkert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","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},"funding":{"github":"jonschlinkert"}},"created_at":"2021-02-19T09:31:32.000Z","updated_at":"2025-04-16T14:45:07.000Z","dependencies_parsed_at":"2025-03-23T13:01:34.641Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/detect-case","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"8e967cdf9dbf8c2e86566ff6994195a55635cca6"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fdetect-case","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fdetect-case/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fdetect-case/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fdetect-case/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/detect-case/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252584326,"owners_count":21771944,"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","capitalized","casing","casing-change","change-case","dash-case","kebab-case","kebabcase","lowercase","pascalcase","sentencecase","snake-case","snakecase","titlecase","uppercase"],"created_at":"2024-10-03T15:38:16.776Z","updated_at":"2025-05-06T22:25:03.161Z","avatar_url":"https://github.com/jonschlinkert.png","language":"TypeScript","funding_links":["https://github.com/sponsors/jonschlinkert"],"categories":[],"sub_categories":[],"readme":"# detect-case [![NPM version](https://img.shields.io/npm/v/detect-case.svg?style=flat)](https://www.npmjs.com/package/detect-case) [![NPM monthly downloads](https://img.shields.io/npm/dm/detect-case.svg?style=flat)](https://npmjs.org/package/detect-case) [![NPM total downloads](https://img.shields.io/npm/dt/detect-case.svg?style=flat)](https://npmjs.org/package/detect-case)\n\n\u003e Detects the casing of the input string (camelcase, lowercase, snakecase etc).\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save detect-case\n```\n\n## Usage\n\nThe main export is a function that takes a string as the only argument.\n\n```js\nconst detectCase = require('detect-case');\n// or\nconst { detectCase } = require('detect-case');\n// or\nimport detectCase from 'detect-case';\n// or\nimport { detectCase } from  'detect-case';\n\nconsole.log(detectCase('foo')); // lowercase\nconsole.log(detectCase('FOO')); // uppercase\nconsole.log(detectCase('Foo')); // titlecase\nconsole.log(detectCase('A Good Year')); // titlecase\nconsole.log(detectCase('A very long year')); // sentencecase\nconsole.log(detectCase('FooBar')); // pascalcase\nconsole.log(detectCase('fooBar')); // camelcase\nconsole.log(detectCase('foo_bar')); // snakecase\nconsole.log(detectCase('FOO_BAR')); // uppersnake\nconsole.log(detectCase('1223344')); // unknown\n```\n\n## About\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/summary\u003e\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\nPlease read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eRunning Tests\u003c/strong\u003e\u003c/summary\u003e\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBuilding docs\u003c/strong\u003e\u003c/summary\u003e\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n\u003c/details\u003e\n\n### Author\n\n**Jon Schlinkert**\n\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n\n### License\n\nCopyright © 2025, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the MIT License.\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on January 26, 2025._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fdetect-case","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Fdetect-case","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fdetect-case/lists"}