UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

22 lines 497 B
//#region src/string/test.d.ts /** * `test(target, source)` * * Tests if `target` string matches the `source` regular expression. * * ```ts * test("hello world", /world/); // true * test("hello world", /\d+/); // false * ``` * * ```ts * pipe("hello world", test(/world/)); // true * pipe("hello world", test(/\d+/)); // false * ``` */ declare const test: { (source: RegExp): (target: string) => boolean; (target: string, source: RegExp): boolean; }; //#endregion export { test };