Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/taufik-nurrohman/tick

Utility functions to do time-related tasks.
https://github.com/taufik-nurrohman/tick

debounce delay interval node throttle tick time utility

Last synced: 25 days ago
JSON representation

Utility functions to do time-related tasks.

Awesome Lists containing this project

README

        

Time Utility
============

Utility functions to do time-related tasks.

Usage
-----

### CommonJS

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

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

### ECMAScript

~~~ js
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)