Apply even more let/const transforms.

This commit is contained in:
John-David Dalton
2017-01-09 12:23:34 -08:00
parent e6152a97e8
commit dc687c1d85
177 changed files with 433 additions and 437 deletions

View File

@@ -1,9 +1,9 @@
/** Used to detect hot functions by number of calls within a span of milliseconds. */
var HOT_COUNT = 800,
HOT_SPAN = 16;
const HOT_COUNT = 800;
const HOT_SPAN = 16;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeNow = Date.now;
const nativeNow = Date.now;
/**
* Creates a function that'll short out and invoke `identity` instead
@@ -15,12 +15,12 @@ var nativeNow = Date.now;
* @returns {Function} Returns the new shortable function.
*/
function shortOut(func) {
var count = 0,
lastCalled = 0;
let count = 0;
let lastCalled = 0;
return function(...args) {
var stamp = nativeNow(),
remaining = HOT_SPAN - (stamp - lastCalled);
const stamp = nativeNow();
const remaining = HOT_SPAN - (stamp - lastCalled);
lastCalled = stamp;
if (remaining > 0) {