Apply more let/const transforms.

This commit is contained in:
John-David Dalton
2017-01-08 23:38:19 -08:00
parent ca9e6fa087
commit 4d0c15b49e
115 changed files with 621 additions and 613 deletions

View File

@@ -2,7 +2,7 @@ import debounce from './debounce.js';
import isObject from './isObject.js';
/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
const FUNC_ERROR_TEXT = 'Expected a function';
/**
* Creates a throttled function that only invokes `func` at most once per
@@ -49,8 +49,8 @@ var FUNC_ERROR_TEXT = 'Expected a function';
* jQuery(window).on('popstate', throttled.cancel);
*/
function throttle(func, wait, options) {
var leading = true,
trailing = true;
let leading = true;
let trailing = true;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);