mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Apply more let/const transforms.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user