Skip to main content
Module

x/isx/is_reg_exp.ts>isRegExp

Collection of validation functions for JavaScript data
Latest
function isRegExp
import { isRegExp } from "https://deno.land/x/isx@1.5.0/is_reg_exp.ts";

Whether the input is RegExp of not.

Examples

Example 1

import { isRegExp } from "https://deno.land/x/isx@$VERSION/is_reg_exp.ts";
import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
assertEquals(isRegExp(new RegExp("")), true);
assertEquals(isRegExp({}), false);

Parameters

input: unknown
  • Any input.

Returns

input is RegExp