(epoch: any)
| 46 | } |
| 47 | |
| 48 | export function fmtAbsoluteTime(epoch: any): string { |
| 49 | const v = Number(epoch); |
| 50 | if (!v) return ""; |
| 51 | try { |
| 52 | return new Date(v * 1000).toLocaleString(); |
| 53 | } catch (e) { |
| 54 | return String(epoch); |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | export function escapeRegExp(s: any): string { |
| 59 | return String(s || "").replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); |
no outgoing calls
no test coverage detected