@ngard/tiny-throttle

1.1.0 • Public • Published

tiny-throttle

source bundle size build status license

A minimal utility similar to lodash.throttle. For when every byte counts!


lodash.throttle: bundle size
tiny-throttle: bundle size


Install

npm install @ngard/tiny-throttle

Syntax

throttle(/* function, interval */);

Parameters

function - The function to be throttled. interval - The amount of time, in milliseconds, to wait between invocations of the function. All function calls made during this interval are ignored.

Returns

A throttled function.

Example

import { throttle } from '@ngard/tiny-throttle';

window.addListener('scroll', throttle(animateSomething, 16));

Readme

Keywords

Package Sidebar

Install

npm i @ngard/tiny-throttle

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

14.6 kB

Total Files

8

Last publish

Collaborators

  • ngard