🕰 Generate a relative time string (Example: "3 seconds ago")
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
__tests__
.editorconfig
.gitignore
.prettierignore
.prettierrc
.travis.yml update test engines Jan 26, 2018
LICENSE
README.md
index.d.ts
index.js
package-lock.json
package.json
yarn.lock

README.md

twas

Travis Coveralls branch license

Generate a relative time string (Example: "3 seconds ago")

Install

$ npm i -S twas

Usage

import twas from 'twas';

console.log(twas(Date.now() - (5 * 1000));

// -> 5 seconds ago

License

MIT © Vu Tran