UNPKG
@ecreeth/rn-ui
Version:
latest (1.0.9)
1.0.9
1.0.8
1.0.7
1.0.6
Highly customizable and theming components for React Native
github.com/ecreeth/rn-ui
ecreeth/rn-ui
@ecreeth/rn-ui
/
src
/
utilities
/
pickBy.js
13 lines
(11 loc)
•
264 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
const
pickBy
= (
object
, predicate
) => {
const
result =
Object
.
assign
( {}, ...
Object
.
keys
(
object
|| {}) .
filter
(
key
=>
predicate
(
object
[key], key)) .
map
(
key
=>
({ [key]:
object
[key] })), );
return
result; };
export
default
pickBy;