(value, fallback)
| 138 | } |
| 139 | |
| 140 | function parseTimestamp(value, fallback) { |
| 141 | if (typeof value === 'number' && Number.isFinite(value)) { |
| 142 | return value; |
| 143 | } |
| 144 | |
| 145 | if (typeof value === 'string') { |
| 146 | const parsed = Date.parse(value); |
| 147 | if (Number.isFinite(parsed)) { |
| 148 | return parsed; |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | return fallback; |
| 153 | } |
| 154 | |
| 155 | function generateImportedId(index) { |
| 156 | return `imported-${Date.now()}-${index}-${Math.random().toString(36).slice(2, 9)}`; |
no outgoing calls
no test coverage detected