MCPcopy
hub / github.com/lodash/lodash / parent

Function parent

lodash.js:6670–6672  ·  view source on GitHub ↗

* Gets the parent value at `path` of `object`. * * @private * @param {Object} object The object to query. * @param {Array} path The path to get the parent value of. * @returns {*} Returns the parent value.

(object, path)

Source from the content-addressed store, hash-verified

6668 * @returns {*} Returns the parent value.
6669 */
6670 function parent(object, path) {
6671 return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
6672 }
6673
6674 /**
6675 * Reorder `array` according to the specified indexes where the element at

Callers 2

baseInvokeFunction · 0.85
baseUnsetFunction · 0.85

Calls 2

baseGetFunction · 0.85
baseSliceFunction · 0.85

Tested by

no test coverage detected