source: frontend/node_modules/underscore/cjs/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: 518 bytes
Line 
1var _toPath = require('./_toPath.js');
2var _deepGet = require('./_deepGet.js');
3var isUndefined = require('./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`.
9function get(object, path, defaultValue) {
10 var value = _deepGet(object, _toPath(path));
11 return isUndefined(value) ? defaultValue : value;
12}
13
14module.exports = get;
Note: See TracBrowser for help on using the repository browser.