Install
$ npm install a-while-ago
Usage
const awa = ; console;// => a second ago
API
awa(date)
- date: A past date
Example:
// => a second ago ;// => 2 minutes ago
awa(date, short)
- date: A past date
- short (
boolean
): A past date
Example:
;// => 2m
Related
- minutes-to-read: How long does it take you to read something.
Todo
- Support for sufix object instead of a boolean value.
Current:
;// => 2m
Desired behavior
;// => 2m ;// => 2 minutes ago
License
MIT License © Carlos Abraham