Remove baseForOwn from several modules.

This commit is contained in:
John-David Dalton
2017-03-04 23:26:27 -08:00
parent 17f7069d07
commit 3c2795b816
8 changed files with 31 additions and 28 deletions

View File

@@ -1,6 +1,3 @@
import arrayFilter from './arrayFilter.js'
import keys from './keys.js'
/**
* Creates an array of function property names from own enumerable properties
* of `object`.
@@ -23,9 +20,10 @@ import keys from './keys.js'
* // => ['a', 'b']
*/
function functions(object) {
return object == null
? []
: arrayFilter(keys(object), key => typeof object[key] == 'function')
if (object == null) {
return []
}
return Object.keys(object).filter((key) => typeof object[key] == 'function')
}
export default functions