hustcc/timeago.js

:writing_hand: v4.0.0, sorry for late!

hustcc opened this issue · 1 comments

1 year ago, open the v4.0.0 issue, sorry for late.


4.0.0 will contains below:

  • rewrite with ts.
  • remove class, simplify to 4 API
  • bundle with rollup
  • build cjs & esm
  • remove jquery dom node supported
  • test run with jest-electron for dom environment
  • core code 100% coverage
  • feat: minInterval opts #171

Those can be got on beta version v4.0.0-beta.3.

API

import { format, render, cancel, register } from 'timeago.js';

The 3rd parameter of format, render will be opts. Detail in readme on master branch.

/**
 * render / format options
 */
export type Opts = {
  /** the relative date */
  readonly relativeDate?: TDate;
  /** the realtime */
  readonly minInterval?: number;
};

v4.0.0 released.