@bnidev/js-utils
    Preparing search index...

    Function kebabCase

    • Converts a string to kebab-case.

      Parameters

      • str: string

        The string to convert.

      Returns string

      The string in kebab-case format.

      // ES Module
      import { kebabCase } from '@bnidev/js-utils'

      // CommonJS
      const { kebabCase } = require('@bnidev/js-utils')
      kebabCase('helloWorld') // 'hello-world'
      kebabCase('hello world') // 'hello-world'
      kebabCase('hello_world') // 'hello-world'