src/utils.js
function pick(o, props = []) {
    return props.reduce((acc, k) => {
        if (o.hasOwnProperty(k)) {
            acc[k] = o[k];
        }

        return acc;
    }, {});
}
function pick(o, props = []) {
    return props.reduce((acc, k) => {
        if (o.hasOwnProperty(k)) {
            acc[k] = o[k];
        }

        return acc;
    }, {});
}
function pick ( o , props = [ ] ) { return props . reduce ( ( acc , k ) => { if ( o . hasOwnProperty ( k ) ) { acc [ k ] = o [ k ] ; } return acc ; } , { } ) ; }
Create new object from the inputted one only with the props passed
in the props list.
@param {Object} o - the object to pick props from.
@param {Array.<string>} props - list of props that we want to pick from o.
@returns {Object} the object resultant from the picking operation.
@memberof utils
Create new object from the inputted one only with the props passed in the props list .