Function kebabCase

  • Converts string to kebab case.

    Parameters

    • string: string

      The string to convert.

    Returns string

    Returns the kebab cased string.

    5.6.0

    camelCase, lowerCase, snakeCase, startCase, upperCase, upperFirst

    kebabCase('Foo Bar')
    // => 'foo-bar'

    kebabCase('fooBar')
    // => 'foo-bar'

    kebabCase('__FOO_BAR__')
    // => 'foo-bar'