mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
fix exports
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user