TS-Scribe - v0.6.2
    Preparing search index...

    Function toHeaderCase

    • Converts a given string to Header-Case (also known as Title Case with spaces).

      Parameters

      • text: string | undefined

        The input string to convert.

      Returns string

      The Header-Case version of the input string, or an empty string if input is falsy.

      toHeaderCase('helloWorld');       // "Hello World"
      toHeaderCase('foo_bar-baz'); // "Foo Bar Baz"
      toHeaderCase(' someInputValue'); // "Some Input Value"
      toHeaderCase(undefined); // ""