Bump to v4.16.0.

This commit is contained in:
John-David Dalton
2016-09-17 22:24:52 -07:00
parent fff78cbd5a
commit 0b9ddff408
102 changed files with 977 additions and 600 deletions

View File

@@ -1,8 +1,4 @@
define(['./_baseSetData', './now'], function(baseSetData, now) {
/** Used to detect hot functions by number of calls within a span of milliseconds. */
var HOT_COUNT = 150,
HOT_SPAN = 16;
define(['./_baseSetData', './_shortOut'], function(baseSetData, shortOut) {
/**
* Sets metadata for `func`.
@@ -18,25 +14,7 @@ define(['./_baseSetData', './now'], function(baseSetData, now) {
* @param {*} data The metadata.
* @returns {Function} Returns `func`.
*/
var setData = (function() {
var count = 0,
lastCalled = 0;
return function(key, value) {
var stamp = now(),
remaining = HOT_SPAN - (stamp - lastCalled);
lastCalled = stamp;
if (remaining > 0) {
if (++count >= HOT_COUNT) {
return key;
}
} else {
count = 0;
}
return baseSetData(key, value);
};
}());
var setData = shortOut(baseSetData);
return setData;
});