mirror of
https://github.com/google-map-react/google-map-react.git
synced 2025-12-08 18:26:32 +00:00
11 lines
266 B
JavaScript
11 lines
266 B
JavaScript
// source taken from https://github.com/rackt/redux/blob/master/src/utils/pick.js
|
|
|
|
export default function pick(obj, fn) {
|
|
return Object.keys(obj).reduce((result, key) => {
|
|
if (fn(obj[key])) {
|
|
result[key] = obj[key];
|
|
}
|
|
return result;
|
|
}, {});
|
|
}
|