mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
19 lines
610 B
JavaScript
19 lines
610 B
JavaScript
define(['../utility/constant', '../lang/isNative', './toObject'], function(constant, isNative, toObject) {
|
|
|
|
/** Native method references. */
|
|
var getOwnPropertySymbols = isNative(getOwnPropertySymbols = Object.getOwnPropertySymbols) && getOwnPropertySymbols;
|
|
|
|
/**
|
|
* Creates an array of the own symbols of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of symbols.
|
|
*/
|
|
var getSymbols = !getOwnPropertySymbols ? constant([]) : function(object) {
|
|
return getOwnPropertySymbols(toObject(object));
|
|
};
|
|
|
|
return getSymbols;
|
|
});
|