(time)
| 2512 | } |
| 2513 | |
| 2514 | function toUnixTimestamp(time) { |
| 2515 | // eslint-disable-next-line no-self-compare |
| 2516 | if (typeof time === 'number' && time === time) // Valid, non-NaN number |
| 2517 | return time; |
| 2518 | if (isDate(time)) |
| 2519 | return parseInt(time.getTime() / 1000, 10); |
| 2520 | throw new Error(`Cannot parse time: ${time}`); |
| 2521 | } |
| 2522 | |
| 2523 | function modeNum(mode) { |
| 2524 | // eslint-disable-next-line no-self-compare |
no outgoing calls
no test coverage detected
searching dependent graphs…