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: 10 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 (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-08T19:33:53.000Z (over 1 year ago)
- Last Synced: 2024-09-29T09:51:20.429Z (about 1 month 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
[![Coveralls branch](https://img.shields.io/coveralls/vutran/twas/master.svg?maxAge=2592000&style=flat-square)](https://coveralls.io/github/vutran/twas) [![license](https://img.shields.io/github/license/vutran/twas.svg?maxAge=2592000&style=flat-square)](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)