* Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names.
(value, inherited)
| 385 | * @returns {Array} Returns the array of property names. |
| 386 | */ |
| 387 | function arrayLikeKeys(value, inherited) { |
| 388 | // Safari 8.1 makes `arguments.callee` enumerable in strict mode. |
| 389 | // Safari 9 makes `arguments.length` enumerable in strict mode. |
| 390 | const result = |
| 391 | isArray(value) || isArguments(value) ? baseTimes(value.length, String) : []; |
| 392 | |
| 393 | const length = result.length; |
| 394 | |
| 395 | const skipIndexes = !!length; |
| 396 | |
| 397 | for (const key in value) { |
| 398 | if ( |
| 399 | (inherited || hasOwnProperty.call(value, key)) && |
| 400 | !(skipIndexes && (key === "length" || isIndex(key, length))) |
| 401 | ) { |
| 402 | result.push(key); |
| 403 | } |
| 404 | } |
| 405 | return result; |
| 406 | } |
| 407 | |
| 408 | /** |
| 409 | * The base implementation of `getTag`. |
no test coverage detected