RegExp source
Methods
-
isRegExp(value) → {boolean} <constructor> source
-
Returns whether the given value is a regexp, regardless of which context it comes from. The context may be another frame.
<p>This is the proper idiomatic way to test whether an object is a regexp and replaces the less generally useful
instanceofcheck (which does not work across contexts) and the strangeness that thetypeofa regexp is"object".Parameters:
Name Type Description valueany value
Returns: boolean
whether the given value is a regexp
Generated from a4679af