Use native filter instead of custom one where possible (#4116)

This commit is contained in:
Luiz Américo
2018-12-11 13:26:35 -03:00
committed by John-David Dalton
parent aa1d7d870d
commit 238e763aa1
4 changed files with 4 additions and 9 deletions

View File

@@ -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