Skip to main content

snakeToKebab()

Given a snake_case string, returns a lowercase kebab-case string.

Usage

import { snakeToKebab } from 'string-factory';

snakeToKebab(string);

Prop types

proptyperequireddefault
stringStringyesnull

Examples

snakeToKebab('some_snake_case_string') // some-snake-case-string
snakeToKebab('SOME_OTHER_SNAKE_CASE_STRING') // some-other-snake-case-string