mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 17:47:49 +00:00
Bump to v4.17.3.
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
define(['./_overArg', './stubArray'], function(overArg, stubArray) {
|
||||
define(['./_arrayFilter', './stubArray'], function(arrayFilter, stubArray) {
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Built-in value references. */
|
||||
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
||||
@@ -10,7 +16,15 @@ define(['./_overArg', './stubArray'], function(overArg, stubArray) {
|
||||
* @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) {
|
||||
if (object == null) {
|
||||
return [];
|
||||
}
|
||||
object = Object(object);
|
||||
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
||||
return propertyIsEnumerable.call(object, symbol);
|
||||
});
|
||||
};
|
||||
|
||||
return getSymbols;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user