Get the initials from a string

getInitials('John Doe') // 'JD'
  • Parameters

    • Optionalvalue: null | string

      A string to get the initials from

    • limit: number = 0

      The maximum number of initials to return

    Returns string

    The initials from the string