(regexp: RegExp)
| 28 | } |
| 29 | |
| 30 | function isRegExpMatch(regexp: RegExp) { |
| 31 | return (x: any): x is string => { |
| 32 | return isString(x) && x.match(regexp) != null; |
| 33 | }; |
| 34 | } |
| 35 | |
| 36 | const isTime = isRegExpMatch(/^((0?[0-9])|(1[0-9])|(2[0-3])):([0-5][0-9])$/); |
| 37 | function isNumber(x: any): x is number { |
no test coverage detected
searching dependent graphs…