Skip to main content
types.isRegExp - util - Node documentation
function types.isRegExp

Usage in Deno

import { types } from "node:util";
isRegExp(object: unknown): object is RegExp

Returns true if the value is a regular expression object.

util.types.isRegExp(/abc/);  // Returns true
util.types.isRegExp(new RegExp('abc'));  // Returns true

Parameters

object: unknown

Return Type

object is RegExp
Back to top