1 var baseUnset = require('./internal/baseUnset');
4 * Removes the property at `path` of `object`.
9 * @param {Object} object The object to modify.
10 * @param {Array|string} path The path of the property to unset.
11 * @returns {boolean} Returns `true` if the property is deleted, else `false`.
14 * var object = { 'a': [{ 'b': { 'c': 7 } }] };
15 * _.unset(object, 'a[0].b.c');
18 * console.log(object);
19 * // => { 'a': [{ 'b': {} }] };
21 * _.unset(object, 'a[0].b.c');
24 * console.log(object);
25 * // => { 'a': [{ 'b': {} }] };
27 function unset(object, path) {
28 return object == null ? true : baseUnset(object, path);
31 module.exports = unset;