diff --git a/src/jquery.debounce/.npmignore b/src/jquery.debounce/.npmignore new file mode 100644 index 0000000..af34203 --- /dev/null +++ b/src/jquery.debounce/.npmignore @@ -0,0 +1,2 @@ +/jquery.debounce.specs.html +/jquery.debounce.specs.js diff --git a/src/jquery.debounce/README.md b/src/jquery.debounce/README.md new file mode 100644 index 0000000..ee67c4b --- /dev/null +++ b/src/jquery.debounce/README.md @@ -0,0 +1,56 @@ +## Source + +Can be found here: https://github.com/dfilatov/jquery-plugins/tree/master/src/jquery.debounce +Repository: https://github.com/dfilatov/jquery-plugins + +## Debouncing + +```js +debouncedFn = $.debounce(fn, timeout, [invokeAsap], [context]); +``` + +Options +------- + +- `fn` + + Original function. + +- `timeout` + + Delay. + +- `invokeAsap` + + True/false, false by default. Parameter indicating which of the above debouncing options should be used (the first is used by default). + +- `context` + + Context of the original function. + +## Throttling + +```js +throttledFn = $.throttle(fn, period, [context]); +``` + +Options +------- + +- `fn` + + Original function. + +- `period` + + Period. + +- `context` + + Context of the original function. + +### LICENSE + +Dual licensed under the MIT and GPL licenses: +- https://opensource.org/licenses/mit-license.php +- https://www.gnu.org/licenses/gpl.html diff --git a/src/jquery.debounce/package.json b/src/jquery.debounce/package.json new file mode 100644 index 0000000..f3bf0dd --- /dev/null +++ b/src/jquery.debounce/package.json @@ -0,0 +1,28 @@ +{ + "name": "jquery-debounce-throttle", + "version": "1.0.6", + "description": "jQuery debounce and throttle functions", + "main": "jquery.debounce.js", + "scripts": {}, + "homepage": "https://github.com/dfilatov/jquery-plugins#readme", + "readme": "https://github.com/dfilatov/jquery-plugins/blob/master/readme.md", + "repository": { + "type": "git", + "url": "https://github.com/dfilatov/jquery-plugins.git" + }, + "keywords": [ + "debounce", + "jquery", + "throttle", + "jquery-debounce", + "jquery-throttle" + ], + "dependencies": { + "jquery": ">=1.7" + }, + "author": { + "name": "Filatov Dmitry", + "email": "alpha@zforms.ru" + }, + "license": "MIT" +} \ No newline at end of file