UNPKG

n4s

Version:

typed schema validation version of enforce

8 lines (6 loc) 255 B
import { toRegExp } from '../../utils/regex'; // Checks if string does not match the given regular expression pattern export function notMatches(str: string, regex: RegExp | string): boolean { const r = toRegExp(regex); return !!r && !r.test(str); }