(val, matcher)
| 195 | }; |
| 196 | |
| 197 | function recurMatch(val, matcher) { |
| 198 | if (matcher == null) { |
| 199 | return true; |
| 200 | } |
| 201 | |
| 202 | if (typeof matcher === 'number') { |
| 203 | return (val === matcher); |
| 204 | } else if(typeof matcher === 'string') { |
| 205 | return (val === Number(matcher)); |
| 206 | } else if (matcher instanceof Range) { |
| 207 | return matcher.contains(val); |
| 208 | } else if (Array.isArray(matcher) || (matcher instanceof Array)) { |
| 209 | for (let i = 0; i < matcher.length; i++) { |
| 210 | if (recurMatch(val, matcher[i])) { |
| 211 | return true; |
| 212 | } |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | return false; |
| 217 | } |
| 218 | |
| 219 | /* Date-based scheduler */ |
| 220 | function runOnDate(date, job) { |
no outgoing calls
no test coverage detected
searching dependent graphs…