isLike()
isLike(
a
): (b
) =>boolean
Determine if second string is like the first string/RegExp.
Parameters
a
The string/RegExp to use for testing.
string
| RegExp
Returns
Function
Parameters
b
string
Returns
boolean
Remarks
pure function
Example
isLike(/[jt]s/)('.js'); // true
isLike(/[jt]s/)('.md'); // false