Browse Source
Fix for older browsers without ES6 support
pull/64/head
Tobias Reinwarth
5 years ago
No known key found for this signature in database
GPG Key ID: 99C2444C4B04F8B5
1 changed files with
6 additions and
2 deletions
-
muk_web_utils/static/src/js/underscore.js
|
|
@ -18,7 +18,9 @@ |
|
|
|
**********************************************************************************/ |
|
|
|
|
|
|
|
_.mixin({ |
|
|
|
memoizeDebounce: function(func, wait=0, options={}) { |
|
|
|
memoizeDebounce: function(func, wait, options) { |
|
|
|
wait = (typeof wait !== 'undefined') ? wait : 0; |
|
|
|
options = (typeof options !== 'undefined') ? options : {}; |
|
|
|
var mem = _.memoize(function() { |
|
|
|
return _.debounce(func, wait, options) |
|
|
|
}, options.resolver); |
|
|
@ -29,7 +31,9 @@ _.mixin({ |
|
|
|
}); |
|
|
|
|
|
|
|
_.mixin({ |
|
|
|
memoizeThrottle: function(func, wait=0, options={}) { |
|
|
|
memoizeThrottle: function(func, wait, options) { |
|
|
|
wait = (typeof wait !== 'undefined') ? wait : 0; |
|
|
|
options = (typeof options !== 'undefined') ? options : {}; |
|
|
|
var mem = _.memoize(function() { |
|
|
|
return _.throttle(func, wait, options) |
|
|
|
}, options.resolver); |
|
|
|