Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/core_fn/uncurry/regexp/mod.ts>test

A collection of built-in object method and property as currying function
Latest
variable test
import { test } from "https://deno.land/x/core_fn@v1.0.0-beta.16/uncurry/regexp/mod.ts";

whether a given string matches a given regular expression.

Examples

Example 1

test(new RegExp('^test'), 'testdata') // true
test(/xyz$/, 'testxyz') // true

type

(regExp: RegExp, val: string) => boolean