包详细信息

requestanimationframe-timer

kambing8632.2kISC3.0.3

setTimeout and setInterval by using requestAnimationFrame

clearInterval, clearTimeout, requestAnimationFrame, setInterval

自述文件

requestanimationframe-timer

setTimeout and setInterval by using requestAnimationFrame

Install

npm install --save-dev requestanimationframe-timer

Usage

import { setInterval, setTimeout, clearInterval, clearTimeout } from 'requestanimationframe-timer';

const id_1 = setTimeout((a) => console.log(a), 1000, '1000 ms timeout');
const id_2 = setInterval((a) => console.log(a), 2000, '2000 ms interval');
setTimeout(() => {
  clearTimeout(id_1);
  clearInterval(id_2);
}, 10000);

Maintainers


Chua Kang Ming

更新日志

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

3.0.3 (2020-01-08)

Bug Fixes

3.0.2 (2020-01-08)

Bug Fixes

3.0.1 (2020-01-08)

Bug Fixes

3.0.0 (2020-01-08)

⚠ BREAKING CHANGES

  • commonjs must use require('requestanimationframe-timer').default

Bug Fixes

2.0.0 (2019-12-30)

⚠ BREAKING CHANGES

  • use babel 7 and only node >=10.18

  • use babel 7 and only node >=10.18 (c5122f0)

1.0.5 (2019-09-19)

Bug Fixes

  • update packages with vulnerability (7e50a60)
  • update standard-version (04aa641)

1.0.4 (2018-01-04)

1.0.3 (2018-01-04)

1.0.2 (2018-01-03)

Bug Fixes

  • remove webpack as peerDependencies (acbb8cf)

1.0.1 (2018-01-03)

Bug Fixes

  • change the target to IE 10 to convert down to ES5 (77c03f2)
  • optimize code (84630ab)

1.0.0 (2018-01-03)

FIRST RELEASE!!