mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
Apply let/const transform.
This commit is contained in:
@@ -2,10 +2,10 @@ import isPrototype from './_isPrototype.js';
|
||||
import nativeKeys from './_nativeKeys.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;
|
||||
|
||||
/**
|
||||
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
||||
@@ -18,8 +18,8 @@ function baseKeys(object) {
|
||||
if (!isPrototype(object)) {
|
||||
return nativeKeys(object);
|
||||
}
|
||||
var result = [];
|
||||
for (var key in Object(object)) {
|
||||
const result = [];
|
||||
for (const key in Object(object)) {
|
||||
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
||||
result.push(key);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user