@andizj/string-toolkit
v1.1.0
Published
A small JavaScript library for string manipulation
Downloads
88
Maintainers
Readme
@deinname/string-toolkit
A small JavaScript utility library for string manipulation.
Installation
# With npm:
npm install @deinname/string-toolkit
Usage
const { toSnakeCase, toKebabCase } = require('@deinname/string-toolkit');
toSnakeCase('Hello World'); // → "hello_world"
toKebabCase('Hello World'); // → "hello-world"Functions
toSnakeCase(str)
Converts a string to snake_case.
- Input:
"Hello World" - Output:
"hello_world"
toKebabCase(str)
Converts a string to kebab-case.
- Input:
"Hello World" - Output:
"hello-world"
License
MIT
