(dayOfWeek)
| 9 | }; |
| 10 | |
| 11 | function getWeekdayNumber(dayOfWeek) { |
| 12 | if (typeof dayOfWeek === "number") { |
| 13 | return dayOfWeek; |
| 14 | } |
| 15 | |
| 16 | if (typeof dayOfWeek === "string") { |
| 17 | return WEEKDAYS[dayOfWeek.toLowerCase()]; |
| 18 | } |
| 19 | |
| 20 | return null; |
| 21 | } |
| 22 | |
| 23 | function shouldRunOnWeekday(daysOfWeek, now) { |
| 24 | if (!Array.isArray(daysOfWeek)) { |
no outgoing calls
no test coverage detected