(value, fallback)
| 2882 | } |
| 2883 | |
| 2884 | function parseTimestamp(value, fallback) { |
| 2885 | if (typeof value === 'number' && Number.isFinite(value)) { |
| 2886 | return value; |
| 2887 | } |
| 2888 | |
| 2889 | if (typeof value === 'string') { |
| 2890 | const parsed = Date.parse(value); |
| 2891 | if (Number.isFinite(parsed)) { |
| 2892 | return parsed; |
| 2893 | } |
| 2894 | } |
| 2895 | |
| 2896 | return fallback; |
| 2897 | } |
| 2898 | |
| 2899 | function generateImportedId(index) { |
| 2900 | return `imported-${Date.now()}-${index}-${Math.random().toString(36).slice(2, 9)}`; |
no outgoing calls
no test coverage detected