javascipt-debounce

WebJar for javascipt-debounce

Лицензия

Лицензия

MIT
Категории

Категории

JavaScript Языки программирования
Группа

Группа

org.webjars.bower
Идентификатор

Идентификатор

javascript-debounce
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

javascipt-debounce
WebJar for javascipt-debounce
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/jgarber623/javascript-debounce

Скачать javascript-debounce

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.bower/javascript-debounce/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>javascript-debounce</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/javascript-debounce/
implementation 'org.webjars.bower:javascript-debounce:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.bower/javascript-debounce/
implementation ("org.webjars.bower:javascript-debounce:1.0.0")
'org.webjars.bower:javascript-debounce:jar:1.0.0'
<dependency org="org.webjars.bower" name="javascript-debounce" rev="1.0.0">
  <artifact name="javascript-debounce" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='javascript-debounce', version='1.0.0')
)
libraryDependencies += "org.webjars.bower" % "javascript-debounce" % "1.0.0"
[org.webjars.bower/javascript-debounce "1.0.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

javascript-debounce

npm version

A lightweight, dependency-free JavaScript module for debouncing functions based on David Walsh's debounce function.

Key Features

  • Dependency-free
  • AMD/CommonJS module support

javascript-debounce is also really tiny:

Uncompressed 909 bytes
Minified 664 bytes
Minified and gzipped 406 bytes

Getting javascript-debounce

Adding javascript-debounce to your project is easy! You've got a couple options:

  • Download a tagged version from GitHub and do it yourself (old school).
  • Install via Bower: bower install javascript-debounce
  • Install via npm: npm install javascript-debounce

Usage

debounce(callback, delay)

callback

Type: Function

A function to be executed after delay milliseconds.

delay

Type: Number

The delay, in milliseconds, after the final event invokation at which time callback will be fired.

Example

if ('addEventListener' in window) {
    var handleResize = debounce(function() {
        console.log('This method fired 250ms after the resize event was last invoked.');
    }, 250);

    window.addEventListener('resize', handleResize);
}

Acknowledgments

javascript-debounce is based on David Walsh's code and article JavaScript Debounce Function. His site is an invaluable resource for Web developers.

javascript-debounce is written and maintained by Jason Garber with the help of some great contributors.

License

javascript-debounce is freely available under The MIT License. Go forth and make the Web a more accessible place.

Версии библиотеки

Версия
1.0.0