* A specialized version of `_.pick` that picks `object` properties specified * by `props`. * * @private * @param {Object} object The source object. * @param {string[]} props The property names to pick. * @returns {Object} Returns the new object.
(object, props)
| 5787 | * @returns {Object} Returns the new object. |
| 5788 | */ |
| 5789 | function pickByArray(object, props) { |
| 5790 | object = toObject(object); |
| 5791 | |
| 5792 | var index = -1, |
| 5793 | length = props.length, |
| 5794 | result = {}; |
| 5795 | |
| 5796 | while (++index < length) { |
| 5797 | var key = props[index]; |
| 5798 | if (key in object) { |
| 5799 | result[key] = object[key]; |
| 5800 | } |
| 5801 | } |
| 5802 | return result; |
| 5803 | } |
| 5804 | |
| 5805 | /** |
| 5806 | * A specialized version of `_.pick` that picks `object` properties `predicate` |
no test coverage detected