1 var baseSlice = require('./_baseSlice'),
2 get = require('./get');
5 * Gets the parent value at `path` of `object`.
8 * @param {Object} object The object to query.
9 * @param {Array} path The path to get the parent value of.
10 * @returns {*} Returns the parent value.
12 function parent(object, path) {
13 return path.length == 1 ? object : get(object, baseSlice(path, 0, -1));
16 module.exports = parent;