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

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

Fix frontend appearance

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