Checks if a given value is a valid RegExp object.
RegExp
isRegExp(/ab+c/)// => trueisRegExp(new RegExp("ab+c", "i"))// => trueisRegExp('/test/')// => falseisRegExp(10)// => false Copy
isRegExp(/ab+c/)// => trueisRegExp(new RegExp("ab+c", "i"))// => trueisRegExp('/test/')// => falseisRegExp(10)// => false
The type of the input value.
The value to be checked.
true if the given value is a RegExp object, false otherwise.
true
false
Generated using TypeDoc v0.24.7
Checks if a given value is a valid
RegExp
object.Example