@@ -1,5 +1,9 @@
|
||||
import _ from 'lodash';
|
||||
|
||||
// TODO remove completely, only used in client
|
||||
|
||||
module.exports = _.get;
|
||||
module.exports = function(obj, path) {
|
||||
return _.reduce(path.split('.'), ((function(_this) {
|
||||
return function(curr, next) {
|
||||
return curr != null ? curr[next] : void 0;
|
||||
};
|
||||
})(this)), obj);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user