mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
react app
This commit is contained in:
41
react-app/node_modules/lodash/internal/shimKeys.js
generated
vendored
Normal file
41
react-app/node_modules/lodash/internal/shimKeys.js
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
var isArguments = require('../lang/isArguments'),
|
||||
isArray = require('../lang/isArray'),
|
||||
isIndex = require('./isIndex'),
|
||||
isLength = require('./isLength'),
|
||||
keysIn = require('../object/keysIn');
|
||||
|
||||
/** Used for native method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
function shimKeys(object) {
|
||||
var props = keysIn(object),
|
||||
propsLength = props.length,
|
||||
length = propsLength && object.length;
|
||||
|
||||
var allowIndexes = !!length && isLength(length) &&
|
||||
(isArray(object) || isArguments(object));
|
||||
|
||||
var index = -1,
|
||||
result = [];
|
||||
|
||||
while (++index < propsLength) {
|
||||
var key = props[index];
|
||||
if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
|
||||
result.push(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
module.exports = shimKeys;
|
Reference in New Issue
Block a user