function isRegExp
Jump to headingisRegExp(object: unknown): object is RegExpDeprecated
Returns true if the given object is a RegExp. Otherwise, returns false.
import util from 'node:util';
util.isRegExp(/some regexp/);
// Returns: true
util.isRegExp(new RegExp('another regexp'));
// Returns: true
util.isRegExp({});
// Returns: false
Parameters Jump to heading
Jump to headingobject: unknownReturn Type Jump to heading
object is RegExp