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

@@ -1,10 +1,10 @@
import realNames from './_realNames.js';
/** Used for built-in method references. */
var objectProto = Object.prototype;
const objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
const hasOwnProperty = objectProto.hasOwnProperty;
/**
* Gets the name of `func`.
@@ -14,13 +14,13 @@ var hasOwnProperty = objectProto.hasOwnProperty;
* @returns {string} Returns the function name.
*/
function getFuncName(func) {
var result = `${ func.name }`,
array = realNames[result],
length = hasOwnProperty.call(realNames, result) ? array.length : 0;
const result = `${ func.name }`;
const array = realNames[result];
let length = hasOwnProperty.call(realNames, result) ? array.length : 0;
while (length--) {
var data = array[length],
otherFunc = data.func;
const data = array[length];
const otherFunc = data.func;
if (otherFunc == null || otherFunc == func) {
return data.name;
}