Lines Matching refs:regex
37 static matchRegexs(regex) {
38 if (ArgumentMatchers.isRegExp(regex)) {
39 return regex;
41 throw Error('not a regex');
48 let regex = args[1];
54 if (typeof arg === 'string' && !regex) {
58 if (typeof arg === 'boolean' && !regex) {
62 if (typeof arg === 'number' && !regex) {
66 if (typeof arg === 'object' && !regex) {
70 if (typeof arg === 'function' && !regex) {
74 if (typeof arg === 'string' && regex) {
75 return regex.test(arg);