(timestamp: number)
| 2 | * Converts a timestamp to ms, if it was in s, or keeps it as ms. |
| 3 | */ |
| 4 | export function timestampToMs(timestamp: number): number { |
| 5 | const isMs = timestamp > 9999999999; |
| 6 | return isMs ? timestamp : timestamp * 1000; |
| 7 | } |
| 8 | |
| 9 | /** |
| 10 | * Converts a timestamp to s, if it was in ms, or keeps it as s. |
no outgoing calls
no test coverage detected