Function humanise

  • Converts a string of words to display better to end users by being space separated. If the uppercaseFirstLetter parameter is set to true, then the first letter of each word will also start with an uppercase letter.

    Parameters

    • words: string

      a space or underscore separated string to be made space separated.

    • uppercaseFirstLetter: boolean = false

      if true, the first letter of each word will be uppercase.

    Returns string

    a space separated version of words.