mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Include only enumerable symbols in getSymbols result. [closes #2845]
This commit is contained in:
@@ -6056,7 +6056,11 @@
|
||||
* @param {Object} object The object to query.
|
||||
* @returns {Array} Returns the array of symbols.
|
||||
*/
|
||||
var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
|
||||
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
||||
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
||||
return propertyIsEnumerable.call(object, symbol);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates an array of the own and inherited enumerable symbols of `object`.
|
||||
|
||||
Reference in New Issue
Block a user