Function startsWithOneOf

Returns true if str starts with one of the provided strings.

startsWithOneOf('ab', 'a', 'c'); // true
startsWithOneOf('cc', 'a', 'b'); // false
  • Parameters

    • str: string
    • strings: string[]

    Returns boolean