@mockingbot/timeago

0.2.0 • Public • Published

timeago

A wrapper for Ryan McGeary's jQuery plugin.

timeago

#install

npm install timeago

#usage

var timeago = require('timeago');

var pretty = timeago(+new Date());

console.log(pretty); // just now

You can also use it in Express app templates:

var app = express.createServer();

app.helpers({
  timeago: require('timeago')
});
<div class="timeago"><%- timeago(widget.created) %></div>

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    1

Package Sidebar

Install

npm i @mockingbot/timeago

Weekly Downloads

1

Version

0.2.0

License

none

Last publish

Collaborators

  • xuziwei
  • support-mockingbot
  • iny7
  • yumao
  • caofan
  • dr-js