Skip to main content
isRegExp - node__util.d.ts - Node documentation
function isRegExp

Usage in Deno

```typescript import { isRegExp } from "node:node__util.d.ts"; ```
isRegExp(object: unknown): object is RegExp
Deprecated
Since v4.0.0 - Deprecated
Returns `true` if the given `object` is a `RegExp`. Otherwise, returns `false`. ```js import util from 'node:util'; util.isRegExp(/some regexp/); // Returns: true util.isRegExp(new RegExp('another regexp')); // Returns: true util.isRegExp({}); // Returns: false ```

Parameters

object: unknown

Return Type

object is RegExp