UNPKG

hn-ts

Version:

TypeScript client for the Hacker News API

5 lines (4 loc) 198 B
/** `unixToIsoString` converts a time in Unix seconds to a UTC ISO timestamp */ export function unixToIsoString({ time }: { time: number }): string { return new Date(time * 1000).toISOString(); }