mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 17:47:49 +00:00
Bump to v3.7.0.
This commit is contained in:
19
internal/getSymbols.js
Normal file
19
internal/getSymbols.js
Normal file
@@ -0,0 +1,19 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user