@taufik-nurrohman/tick

1.0.1 • Public • Published

Time Utility

Utility functions to do time-related tasks.

Usage

CommonJS

const {debounce} = require('@taufik-nurrohman/tick');

window.addEventListener('resize', debounce(e => {
    console.log('Resize!');
}, 1000));

ECMAScript

import {debounce} from '@taufik-nurrohman/tick';

window.addEventListener('resize', debounce(e => {
    console.log('Resize!');
}, 1000));

Methods

debounce(then, time)

delay(then, time)

throttle(then, interval)

Package Sidebar

Install

npm i @taufik-nurrohman/tick

Weekly Downloads

14

Version

1.0.1

License

MIT

Unpacked Size

3.49 kB

Total Files

5

Last publish

Collaborators

  • taufik-nurrohman