fix exports

This commit is contained in:
Matteo Pagliazzi
2019-10-01 17:53:48 +02:00
parent 4faa06f37d
commit cca5b8492b
144 changed files with 271 additions and 315 deletions

View File

@@ -5,11 +5,11 @@ import each from 'lodash/each';
import set from 'lodash/set';
import get from 'lodash/get';
module.exports = function pickDeep (obj, properties) {
export default function pickDeep (obj, properties) {
if (!Array.isArray(properties)) throw new Error('"properties" must be an array');
let result = {};
each(properties, (prop) => set(result, prop, get(obj, prop)));
return result;
};
}