Browse Source

publish muk_web_utils - 11.0

11.0
MuK IT GmbH 5 years ago
parent
commit
dbdffde152
  1. 10
      muk_web_utils/static/src/js/underscore.js

10
muk_web_utils/static/src/js/underscore.js

@ -17,8 +17,10 @@
* *
**********************************************************************************/ **********************************************************************************/
_.mixin({
memoizeDebounce: function(func, wait=0, options={}) {
__.mixin({
memoizeDebounce: function(func, wait, options) {
wait = (typeof wait !== 'undefined') ? wait : 0;
options = (typeof options !== 'undefined') ? options : {};
var mem = _.memoize(function() { var mem = _.memoize(function() {
return _.debounce(func, wait, options) return _.debounce(func, wait, options)
}, options.resolver); }, options.resolver);
@ -29,7 +31,9 @@ _.mixin({
}); });
_.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() { var mem = _.memoize(function() {
return _.throttle(func, wait, options) return _.throttle(func, wait, options)
}, options.resolver); }, options.resolver);

Loading…
Cancel
Save