• Returns the kebab case representation of the given string

    Parameters

    • Optionaltext: null | string

      the source string to inspect

    Returns string | undefined | null

    the kebab case representation of the given string

    toKebabCase('FOO BAR');    // 'foo-bar'
    toKebabCase('fooBar'); // 'foo-bar'
    toKebabCase('__FOO_BAR__'); // 'foo-bar'