Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vutran/twas
🕰 Tiny (280B) relative time string function (eg: "3 seconds ago")
https://github.com/vutran/twas
ago from-now relative time timeago
Last synced: 2 days ago
JSON representation
🕰 Tiny (280B) relative time string function (eg: "3 seconds ago")
- Host: GitHub
- URL: https://github.com/vutran/twas
- Owner: vutran
- License: mit
- Created: 2018-01-24T21:06:48.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-08T19:33:53.000Z (about 2 years ago)
- Last Synced: 2024-09-29T09:51:20.429Z (5 months ago)
- Topics: ago, from-now, relative, time, timeago
- Language: JavaScript
- Homepage:
- Size: 500 KB
- Stars: 250
- Watchers: 3
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# twas
[](https://coveralls.io/github/vutran/twas) [](LICENSE)
> Tiny (280B) relative time string function (eg: "3 seconds ago")
## Install
```bash
$ npm i -S twas
```## Usage
```js
import twas from 'twas';console.log(twas(Date.now() - (5 * 1000));
// -> 5 seconds ago
```## License
MIT © [Vu Tran](https://github.com/vutran)