MCPcopy
hub / github.com/lodash/lodash / get

Function get

lodash.js:13225–13228  ·  view source on GitHub ↗

* Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path

(object, path, defaultValue)

Source from the content-addressed store, hash-verified

13223 * // => 'default'
13224 */
13225 function get(object, path, defaultValue) {
13226 var result = object == null ? undefined : baseGet(object, path);
13227 return result === undefined ? defaultValue : result;
13228 }
13229
13230 /**
13231 * Checks if `path` is a direct property of `object`.

Callers 2

baseAtFunction · 0.85
baseMatchesPropertyFunction · 0.85

Calls 1

baseGetFunction · 0.85

Tested by

no test coverage detected