snake-kebab
v1.0.0
Published
Converts snake_case strings to kebab-case by replacing underscores with hyphens.
Maintainers
Readme
snake-kebab
URL:
https://alexstevovich.com/repos/snake-kebab-nodejs
A utility that converts snake_case strings to kebab-case by replacing underscores with hyphens. Non-string values are returned unchanged.
Installation
npm install snake-kebabExample
import snakeKebab from 'snake-kebab';
snakeKebab('snake_case');
// → "snake-case"
snakeKebab('already-kebab');
// → "already-kebab"
snakeKebab('_leading_and_trailing_');
// → "-leading-and-trailing-"
snakeKebab(123);
// → 123 (non-strings are returned unchanged)License
Licensed under the MIT License.
