Function camelise

  • Converts a string of words to remove spaces or underscores and capitalise each word except for the first (lowerCamelCase). If the uppercaseFirstLetter parameter is set to true, then it produces the string in UpperCamelCase, also known as PascalCase.

    Parameters

    • words: string

      a space or underscore separated string to be converted to camelcase.

    • uppercaseFirstLetter: boolean = false

      if true, the first letter will be uppercase.

    Returns string

    a camelcase version of words.