mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Use native filter instead of custom one where possible (#4116)
This commit is contained in:
committed by
John-David Dalton
parent
aa1d7d870d
commit
238e763aa1
@@ -1,5 +1,3 @@
|
||||
import filter from '../filter.js'
|
||||
|
||||
/** Built-in value references. */
|
||||
const propertyIsEnumerable = Object.prototype.propertyIsEnumerable
|
||||
|
||||
@@ -18,7 +16,7 @@ function getSymbols (object) {
|
||||
return []
|
||||
}
|
||||
object = Object(object)
|
||||
return filter(nativeGetSymbols(object), (symbol) => propertyIsEnumerable.call(object, symbol))
|
||||
return nativeGetSymbols(object).filter((symbol) => propertyIsEnumerable.call(object, symbol))
|
||||
}
|
||||
|
||||
export default getSymbols
|
||||
|
||||
Reference in New Issue
Block a user