1.0.1 • Published 2 years ago

@taufik-nurrohman/tick v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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)