(input: string)
| 265 | } |
| 266 | |
| 267 | function tryParseRegex(input: string): RegExp { |
| 268 | const trimmed = input.trim(); |
| 269 | if (trimmed.startsWith("/") && trimmed.lastIndexOf("/") > 0) { |
| 270 | const lastSlash = trimmed.lastIndexOf("/"); |
| 271 | const pattern = trimmed.slice(1, lastSlash); |
| 272 | const flags = trimmed.slice(lastSlash + 1); |
| 273 | return new RegExp(pattern, flags); |
| 274 | } |
| 275 | return new RegExp(trimmed); |
| 276 | } |
| 277 | |
| 278 | async function scheduleTask(task: AcronTask) { |
| 279 | const key = makeCronKey(task.id); |
no outgoing calls
no test coverage detected