[go: up one dir, main page]

setRafTimeout

0.2.0 • Public • Published

setRafTimeout

setRafTimeout is equal with setTimout totally but has one feature:

npm version build status npm downloads Gitter

  • The callback function in setRafTimeout won't be called When the current broswer tab cannot be seen.

usage

$ npm i -S setRafTimeout

docs

setRafTimeout

import setRafTimeout, { clearRafTimeout } from 'setRafTimeout';

const timeId = setRafTimeout(callback, timeout);

clearRafTimeout(timeId);

setRafInterval

import { setRafInterval, clearRafInterval } from 'setRafTimeout';

const timer = setRafInterval(callback, timeout);

clearRafInterval(timer);

Package Sidebar

Install

npm i setRafTimeout

Weekly Downloads

0

Version

0.2.0

License

ISC

Last publish

Collaborators

  • hzongquan