source: frontend/node_modules/underscore/modules/get.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 497 bytes
Line 
1import toPath from './_toPath.js';
2import deepGet from './_deepGet.js';
3import isUndefined from './isUndefined.js';
4
5// Get the value of the (deep) property on `path` from `object`.
6// If any property in `path` does not exist or if the value is
7// `undefined`, return `defaultValue` instead.
8// The `path` is normalized through `_.toPath`.
9export default function get(object, path, defaultValue) {
10 var value = deepGet(object, toPath(path));
11 return isUndefined(value) ? defaultValue : value;
12}
Note: See TracBrowser for help on using the repository browser.