mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +00:00
20 lines
601 B
JavaScript
20 lines
601 B
JavaScript
import constant from '../utility/constant';
|
|
import isNative from '../lang/isNative';
|
|
import toObject from './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));
|
|
};
|
|
|
|
export default getSymbols;
|