{"id":13431137,"url":"https://github.com/fabiospampinato/kasi","last_synced_at":"2025-04-07T14:15:00.269Z","repository":{"id":195418008,"uuid":"692880995","full_name":"fabiospampinato/kasi","owner":"fabiospampinato","description":"A collection of functions for working with different casings.","archived":false,"fork":false,"pushed_at":"2025-01-18T00:02:10.000Z","size":18,"stargazers_count":30,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T12:09:07.086Z","etag":null,"topics":["case","casing","check","convert","copy"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/fabiospampinato.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},"funding":{"github":"fabiospampinato","custom":"https://www.paypal.me/fabiospampinato"}},"created_at":"2023-09-17T21:28:09.000Z","updated_at":"2025-01-23T01:51:29.000Z","dependencies_parsed_at":"2023-09-17T21:31:32.029Z","dependency_job_id":"d41fd893-49aa-4606-82b1-9d80310253bb","html_url":"https://github.com/fabiospampinato/kasi","commit_stats":null,"previous_names":["fabiospampinato/kasi"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fkasi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fkasi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fkasi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fkasi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabiospampinato","download_url":"https://codeload.github.com/fabiospampinato/kasi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247666015,"owners_count":20975788,"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":["case","casing","check","convert","copy"],"created_at":"2024-07-31T02:01:00.780Z","updated_at":"2025-04-07T14:15:00.241Z","avatar_url":"https://github.com/fabiospampinato.png","language":"JavaScript","funding_links":["https://github.com/sponsors/fabiospampinato","https://www.paypal.me/fabiospampinato"],"categories":["JavaScript"],"sub_categories":[],"readme":"# Kasi\n\nA collection of functions for working with different casings.\n\n## Install\n\n```sh\nnpm install kasi\n```\n\n## Functions\n\n| Check                             | Convert                           | Extra             |\n| --------------------------------- | --------------------------------- | ----------------- |\n| [isCamelCase](#iscamelcase)       | [toCamelCase](#tocamelcase)       | [apply](#apply)   |\n| [isConstantCase](#isconstantcase) | [toConstantCase](#toconstantcase) | [copy](#copy)     |\n| [isDotCase](#isdotcase)           | [toDotCase](#todotcase)           | [detect](#detect) |\n| [isKebabCase](#iskebabcase)       | [toKebabCase](#tokebabcase)       |                   |\n| [isLowerCase](#islowercase)       | [toLowerCase](#tolowercase)       |                   |\n| [isPascalCase](#ispascalcase)     | [toPascalCase](#topascalcase)     |                   |\n| [isPathCase](#ispathcase)         | [toPathCase](#topathcase)         |                   |\n| [isSnakeCase](#issnakecase)       | [toSnakeCase](#tosnakecase)       |                   |\n| [isTitleCase](#istitlecase)       | [toTitleCase](#totitlecase)       |                   |\n| [isUpperCase](#isuppercase)       | [toUpperCase](#touppercase)       |                   |\n\n### Check\n\nThese functions allow you to check if a string is using a specific casing.\n\n#### `isCamelCase`\n\n```ts\nimport {isCamelCase} from 'kasi';\n\nisCamelCase ( 'fooBar' ); // =\u003e true\nisCamelCase ( 'foo-bar' ); // =\u003e false\n```\n\n#### `isConstantCase`\n\n```ts\nimport {isConstantCase} from 'kasi';\n\nisConstantCase ( 'FOO_BAR' ); // =\u003e true\nisConstantCase ( 'fooBar' ); // =\u003e false\n```\n\n#### `isDotCase`\n\n```ts\nimport {isDotCase} from 'kasi';\n\nisDotCase ( 'foo.bar' ); // =\u003e true\nisDotCase ( 'fooBar' ); // =\u003e false\n```\n\n#### `isKebabCase`\n\n```ts\nimport {isKebabCase} from 'kasi';\n\nisKebabCase ( 'foo-bar' ); // =\u003e true\nisKebabCase ( 'fooBar' ); // =\u003e false\n```\n\n#### `isLowerCase`\n\n```ts\nimport {isLowerCase} from 'kasi';\n\nisLowerCase ( 'foo' ); // =\u003e true\nisLowerCase ( 'Foo' ); // =\u003e false\n```\n\n#### `isPascalCase`\n\n```ts\nimport {isPascalCase} from 'kasi';\n\nisPascalCase ( 'FooBar' ); // =\u003e true\nisPascalCase ( 'fooBar' ); // =\u003e false\n```\n\n#### `isPathCase`\n\n```ts\nimport {isPathCase} from 'kasi';\n\nisPathCase ( 'foo/bar' ); // =\u003e true\nisPathCase ( 'fooBar' ); // =\u003e false\n```\n\n#### `isSnakeCase`\n\n```ts\nimport {isSnakeCase} from 'kasi';\n\nisSnakeCase ( 'foo_bar' ); // =\u003e true\nisSnakeCase ( 'fooBar' ); // =\u003e false\n```\n\n#### `isTitleCase`\n\n```ts\nimport {isTitleCase} from 'kasi';\n\nisTitleCase ( 'Foo Bar' ); // =\u003e true\nisTitleCase ( 'fooBar' ); // =\u003e false\n```\n\n#### `isUpperCase`\n\n```ts\nimport {isUpperCase} from 'kasi';\n\nisUpperCase ( 'FOO' ); // =\u003e true\nisUpperCase ( 'foo' ); // =\u003e false\n```\n\n### Convert\n\nThese functions allow you to convert a string to a specific casing.\n\n#### `toCamelCase`\n\n```ts\nimport {toCamelCase} from 'kasi';\n\ntoCamelCase ( 'foo-bar' ); // =\u003e 'fooBar'\ntoCamelCase ( 'foo_bar' ); // =\u003e 'fooBar'\n```\n\n#### `toConstantCase`\n\n```ts\nimport {toConstantCase} from 'kasi';\n\ntoConstantCase ( 'fooBar' ); // =\u003e 'FOO_BAR'\ntoConstantCase ( 'foo-bar' ); // =\u003e 'FOO_BAR'\n```\n\n#### `toDotCase`\n\n```ts\nimport {toDotCase} from 'kasi';\n\ntoDotCase ( 'fooBar' ); // =\u003e 'foo.bar'\ntoDotCase ( 'foo-bar' ); // =\u003e 'foo.bar'\n```\n\n#### `toKebabCase`\n\n```ts\nimport {toKebabCase} from 'kasi';\n\ntoKebabCase ( 'fooBar' ); // =\u003e 'foo-bar'\ntoKebabCase ( 'foo_bar' ); // =\u003e 'foo-bar'\n```\n\n#### `toLowerCase`\n\n```ts\nimport {toLowerCase} from 'kasi';\n\ntoLowerCase ( 'FooBar' ); // =\u003e 'foobar'\ntoLowerCase ( 'foo-bar' ); // =\u003e 'foo-bar'\n```\n\n#### `toPascalCase`\n\n```ts\nimport {toPascalCase} from 'kasi';\n\ntoPascalCase ( 'foo-bar' ); // =\u003e 'FooBar'\ntoPascalCase ( 'foo_bar' ); // =\u003e 'FooBar'\n```\n\n#### `toPathCase`\n\n```ts\nimport {toPathCase} from 'kasi';\n\ntoPathCase ( 'fooBar' ); // =\u003e 'foo/bar'\ntoPathCase ( 'foo-bar' ); // =\u003e 'foo/bar'\n```\n\n#### `toSnakeCase`\n\n```ts\nimport {toSnakeCase} from 'kasi';\n\ntoSnakeCase ( 'fooBar' ); // =\u003e 'foo_bar'\ntoSnakeCase ( 'foo-bar' ); // =\u003e 'foo_bar'\n```\n\n#### `toTitleCase`\n\n```ts\nimport {toTitleCase} from 'kasi';\n\ntoTitleCase ( 'fooBar' ); // =\u003e 'Foo Bar'\ntoTitleCase ( 'foo-bar' ); // =\u003e 'Foo Bar'\n```\n\n#### `toUpperCase`\n\n```ts\nimport {toUpperCase} from 'kasi';\n\ntoUpperCase ( 'fooBar' ); // =\u003e 'FOOBAR'\ntoUpperCase ( 'foo-bar' ); // =\u003e 'FOO-BAR'\n```\n\n### Extra\n\nThese extra functions perform other operations related to casings.\n\n#### `apply`\n\nTransform a string to the given casing. Useful in combination with `detect`.\n\n```ts\nimport {apply} from 'kasi';\n\napply ( 'foo-bar', 'camel' ); // =\u003e 'fooBar'\napply ( 'foo-bar', 'constant' ); // =\u003e 'FOO_BAR'\n```\n\n#### `copy`\n\nThis function copies the casing of a string to another string, character by character. The two strings must have the same length.\n\n```ts\nimport {copy} from 'kasi';\n\ncopy ( 'sIlLy', 'lions' ); // =\u003e 'lIoNs'\ncopy ( 'SiLlY', 'lions' ); // =\u003e 'LiOnS'\n```\n\n#### `detect`\n\nThis function detects the casing of a string. Useful in combination with `apply`.\n\n```ts\nimport {detect} from 'kasi';\n\ndetect ( 'fooBar' ); // =\u003e 'camel'\ndetect ( 'FOO_BAR' ); // =\u003e 'constant'\ndetect ( ' foo BAR ' ); // =\u003e 'unknown'\n```\n\n## Related\n\n- **[Kasi for VSCode](https://marketplace.visualstudio.com/items?itemName=fabiospampinato.kasi)**: The official companion extension for Kasi, for quickly changing the casing of your selections.\n\n## License\n\nMIT © Fabio Spampinato\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiospampinato%2Fkasi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabiospampinato%2Fkasi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiospampinato%2Fkasi/lists"}