* A fallback implementation of `Object.keys` which creates an array of the * own enumerable property names of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names.
(object)
| 5917 | * @returns {Array} Returns the array of property names. |
| 5918 | */ |
| 5919 | function shimKeys(object) { |
| 5920 | var props = keysIn(object), |
| 5921 | propsLength = props.length, |
| 5922 | length = propsLength && object.length, |
| 5923 | support = lodash.support; |
| 5924 | |
| 5925 | var allowIndexes = length && isLength(length) && |
| 5926 | (isArray(object) || (support.nonEnumArgs && isArguments(object))); |
| 5927 | |
| 5928 | var index = -1, |
| 5929 | result = []; |
| 5930 | |
| 5931 | while (++index < propsLength) { |
| 5932 | var key = props[index]; |
| 5933 | if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { |
| 5934 | result.push(key); |
| 5935 | } |
| 5936 | } |
| 5937 | return result; |
| 5938 | } |
| 5939 | |
| 5940 | /** |
| 5941 | * Converts `value` to an array-like object if it is not one. |
no test coverage detected