MCPcopy Create free account
hub / github.com/RubyLouvre/anu / baseGet

Function baseGet

test/babel.js:27966–27976  ·  view source on GitHub ↗

* The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value.

(object, path)

Source from the content-addressed store, hash-verified

27964 * @returns {*} Returns the resolved value.
27965 */
27966 function baseGet(object, path) {
27967 path = castPath(path, object);
27968
27969 var index = 0,
27970 length = path.length;
27971
27972 while (object != null && index < length) {
27973 object = object[toKey(path[index++])];
27974 }
27975 return index && index == length ? object : undefined;
27976 }
27977
27978 module.exports = baseGet;
27979

Callers 2

basePropertyDeepFunction · 0.85
getFunction · 0.85

Calls 2

castPathFunction · 0.85
toKeyFunction · 0.85

Tested by

no test coverage detected