time-utils
Time-related utilities
Introduction
time-utils is a TypeScript library providing time-related types and functions.
Installation
The package on NPM is:
@giancosta86/time-utils
The public API entirely resides in the root package index, so one shouldn't reference specific modules.
Usage
Please, refer to:
-
the
IsoDate
class -
the
Milliseconds
,Seconds
andMinutes
type aliases -
delay()
,epsilonDelay()
andsyncDelay
(especially for tests) -
the
Timestamp
alias - greatly combined withDate.now()
-
measureDuration
- to time both sync and async blocks (particularly in tests)