ts-humanize / duration
duration(
dur,options?):undefined|string
Defined in: time/time.ts:101
Formats a duration to a human readable string.
Negative numbers will be treated as positives
number
DurationOptions
undefined | string
duration(30_000_000);
// => "8 hours"
duration(3, { unit: "weeks" });
// => "3 weeks"