Returns the matched prefix for the string (if it exists). Great for matching string union types.
startsWithOneOf('ab', 'a', 'c'); // 'a'startsWithOneOf('cc', 'a', 'b'); // undefined Copy
startsWithOneOf('ab', 'a', 'c'); // 'a'startsWithOneOf('cc', 'a', 'b'); // undefined
Returns the matched prefix for the string (if it exists). Great for matching string union types.