reverseString capitalizeWords toSnakeCase toKebabCase
npm install string-utils-pro-sfbash
npm install string-utils-pro-sf
`
Usage
After installing the package, you can import the functions and use them as needed.
$3
`
const {
reverseString,
capitalizeWords,
toSnakeCase,
toKebabCase,
} = require('string-utils-pro-sf');
`
$3
Generate the reversed version of a string:
`
const reversed = reverseString('hello world');
console.log(reversed);
// Output: 'dlrow olleh'
`
$3
Capitalize the first letter of every word in a string:
`
const capitalized = capitalizeWords('hello world');
console.log(capitalized);
// Output: 'Hello World'
`
$3
Transform a string to snake_case:
`
const snakeCase = toSnakeCase('Hello World Test');
console.log(snakeCase);
// Output: 'hello_world_test'
`
$3
Transform a string to kebab-case:
`
const kebabCase = toKebabCase('Hello World Test');
console.log(kebabCase);
// Output: 'hello-world-test'
``