(obj, fn)
| 1 | // source taken from https://github.com/rackt/redux/blob/master/src/utils/pick.js |
| 2 | |
| 3 | export default function pick(obj, fn) { |
| 4 | return Object.keys(obj).reduce((result, key) => { |
| 5 | if (fn(obj[key])) { |
| 6 | result[key] = obj[key]; // eslint-disable-line |
| 7 | } |
| 8 | return result; |
| 9 | }, {}); |
| 10 | } |
no outgoing calls
no test coverage detected