Assert that input is a string that matches the given pattern.
Parameters
input: unknown
pattern: RegExp
error: string|Error = 'input is not a string that matches the pattern'
Returns assertsinputisstring
Example
assertIsStringMatching('hello', /^h/); // does not throw assertIsStringMatching('world', /^h/); // throws TypeError: input is not a string that matches the pattern
Assert that
inputis a string that matches the givenpattern.