@rvoh/dream
    Preparing search index...

    Function hyphenize

    • Converts a string or the keys of an object to hyphen-case (kebab-case).

      Examples: hyphenize('HelloWorld_how_are___you') // 'hello-world-how-are-you' hyphenize('Hello.World') // 'hello.world' hyphenize('Hello/World') // 'hello/world' hyphenize({ helloWorld: 'howAreYou' }) // { 'hello-world': 'howAreYou' }

      Type Parameters

      • const T
      • RT

      Parameters

      • target: T

        The string or object to hyphenize

      Returns RT

      The hyphenized string or object