mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 15:07:02 +03:00
KnockoutJS drop unused rateLimit method
This commit is contained in:
parent
6b3c073ddd
commit
2a3cea63cc
3 changed files with 13 additions and 37 deletions
14
vendors/knockout/src/subscribables/extenders.js
vendored
14
vendors/knockout/src/subscribables/extenders.js
vendored
|
|
@ -1,19 +1,7 @@
|
|||
ko.extenders = {
|
||||
'debounce': (target, timeout) => target.limit(callback => debounce(callback, timeout)),
|
||||
|
||||
'rateLimit': (target, options) => {
|
||||
var timeout, method, limitFunction;
|
||||
|
||||
if (typeof options == 'number') {
|
||||
timeout = options;
|
||||
} else {
|
||||
timeout = options['timeout'];
|
||||
method = options['method'];
|
||||
}
|
||||
|
||||
limitFunction = typeof method == 'function' ? method : throttle;
|
||||
target.limit(callback => limitFunction(callback, timeout, options));
|
||||
},
|
||||
'rateLimit': (target, timeout) => target.limit(callback => throttle(callback, timeout)),
|
||||
|
||||
'notify': (target, notifyWhen) => {
|
||||
target.equalityComparer = notifyWhen == "always" ?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue