Display time in a human-readable format.
You can install the library using npm
$ npm install --save @jacobmarshall/human-time
and use it like
import human from '@jacobmarshall/human-time';
human(new Date());
// => "just now"
human(new Date(Date.now() + 5 * 1000))
// => "5 seconds from now"
human(new Date(Date.now() + 5 * 1000), false)
// => "5 seconds"
MIT