Converts different naming conventions
npm install @huz-com/text-case- Converts different naming conventions
- Provides also aliases for different naming culture
TSYesYes IntelliJ Code InspectionsYesYesYes go to test foldernpm run clear // clears "dist" folder
- npm run lint // runs eslint for static code analysis
- npm run test // runs test files in "test" folder
- npm run build // builds JS files at "dist" folder
- npm publish or npm run publix // publishes "dist" folder to npmFormats
- camelCase, camelize: textCase
- pascalCase, capitalize: TextCase
- snakeCase, underscore, decamelize: text_case
- kebabCase, dashCase: text-case
- upperCase, allCaps, constCase: TEXT_CASE
- titleCase, labelCase: Text Case
- regularCase, humanize: text case
- dotCase: text.case
- folderCase: text/case
- pipeCase: text|caseInstall
npm i @huz-com/text-caseSamples
``javascript
const {textCase} = require('@huz-com/text-case');textCase.snakeCase('foo bar'); // ==> foo_bar
textCase.underscore('fooBar'); // alias for textCase.snakeCase
textCase.decamelize('FOO_BAR'); // alias for textCase.snakeCase
textCase.camelCase('foo--bar'); // ==> fooBar
textCase.camelCase('foo-BAR', true); // ==> fooBAR
textCase.camelize('FOO BAR'); // alias for textCase.camelCase
textCase.pascalCase('foo--bar'); // ==> FooBar
textCase.pascalCase('foo-BAR', true); // ==> FooBAR
textCase.capitalize('FOO BAR'); // alias for textCase.pascalCase
textCase.titleCase('foo--bar'); // ==> Foo Bar
textCase.labelCase('FOO BAR'); // alias for textCase.titleCase
textCase.regularCase('fooBar'); // ==> foo bar
textCase.humanize('FOO BAR'); // alias for textCase.regularCase
textCase.kebabCase('fooBar'); // ==> foo-bar
textCase.dashCase('FOO BAR'); // alias for textCase.kebabCase
textCase.upperCase('fooBar'); // ==> FOO_BAR
textCase.allCaps('foo--bar'); // alias for textCase.upperCase
textCase.constCase('FOO BAR'); // alias for textCase.upperCase
textCase.dotCase('fooBar'); // ==> foo.bar
textCase.folderCase('fooBar'); // ==> foo/bar
textCase.pipeCase('fooBar'); // ==> foo|bar
``Exception Handling
- If input's type is not string then throws TextCaseTextError`