@kitsuyui/string
v0.1.6
Published
A simple additional library for String
Downloads
2
Readme
@kitsuyui/string
A simple string manipulation library
Installation
NPM
npm install @kitsuyui/string
Yarn
yarn add @kitsuyui/string
PNPM
pnpm add @kitsuyui/string
Usage
convertCase
import { convertCase } from '@kitsuyui/string';
convertCase('helloWorld', 'kebab-case') // => `hello-world`
convertCase('hello-world', 'camelCase') // => `helloWorld`
convertCase('helloWorld', 'kebab-case') // => `hello-world`
convertCase('hello-world', 'camelCase') // => `helloWorld`
convertCase('hello-world', 'snake_case') // => `hello_world`
convertCase('hello-world', 'space separated') // => `hello world`
convertCase('hello-world', 'UpperCamelCase') // => `HelloWorld`
convertCase('hello-world', 'PascalCase') // => `HelloWorld`
convertCase('hello-world', 'lowerCamelCase') // => `helloWorld`
convertCase('hello-world', 'lowerPascalCase') // => `helloWorld`
convertCase('hello-world', 'SCREAMING_SNAKE_CASE') // => `HELLO_WORLD`
convertCase('hello-world', 'MACRO_CASE') // => `HELLO_WORLD`
convertCase('hello-world', 'Train-Case') // => `Hello-World`
convertCase('hello-world', 'dot.separated') // => `hello.world`
convertCase('hello-world', 'flatcase') // => `helloworld`
convertCase('hello-world', 'ALL CAPS') // => `HELLO WORLD`
License
MIT