mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Remove semicolons.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import baseTimes from './baseTimes.js';
|
||||
import isArguments from '../isArguments.js';
|
||||
import isBuffer from '../isBuffer.js';
|
||||
import isIndex from './isIndex.js';
|
||||
import isTypedArray from '../isTypedArray.js';
|
||||
import baseTimes from './baseTimes.js'
|
||||
import isArguments from '../isArguments.js'
|
||||
import isBuffer from '../isBuffer.js'
|
||||
import isIndex from './isIndex.js'
|
||||
import isTypedArray from '../isTypedArray.js'
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
const hasOwnProperty = Object.prototype.hasOwnProperty
|
||||
|
||||
/**
|
||||
* Creates an array of the enumerable property names of the array-like `value`.
|
||||
@@ -16,13 +16,13 @@ const hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
* @returns {Array} Returns the array of property names.
|
||||
*/
|
||||
function arrayLikeKeys(value, inherited) {
|
||||
const isArr = Array.isArray(value);
|
||||
const isArg = !isArr && isArguments(value);
|
||||
const isBuff = !isArr && !isArg && isBuffer(value);
|
||||
const isType = !isArr && !isArg && !isBuff && isTypedArray(value);
|
||||
const skipIndexes = isArr || isArg || isBuff || isType;
|
||||
const result = skipIndexes ? baseTimes(value.length, String) : [];
|
||||
const length = result.length;
|
||||
const isArr = Array.isArray(value)
|
||||
const isArg = !isArr && isArguments(value)
|
||||
const isBuff = !isArr && !isArg && isBuffer(value)
|
||||
const isType = !isArr && !isArg && !isBuff && isTypedArray(value)
|
||||
const skipIndexes = isArr || isArg || isBuff || isType
|
||||
const result = skipIndexes ? baseTimes(value.length, String) : []
|
||||
const length = result.length
|
||||
|
||||
for (const key in value) {
|
||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||
@@ -35,10 +35,10 @@ function arrayLikeKeys(value, inherited) {
|
||||
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties.
|
||||
isIndex(key, length))
|
||||
))) {
|
||||
result.push(key);
|
||||
result.push(key)
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return result
|
||||
}
|
||||
|
||||
export default arrayLikeKeys;
|
||||
export default arrayLikeKeys
|
||||
|
||||
Reference in New Issue
Block a user