1 # unset-value [![NPM version](https://img.shields.io/npm/v/unset-value.svg?style=flat)](https://www.npmjs.com/package/unset-value) [![NPM monthly downloads](https://img.shields.io/npm/dm/unset-value.svg?style=flat)](https://npmjs.org/package/unset-value) [![NPM total downloads](https://img.shields.io/npm/dt/unset-value.svg?style=flat)](https://npmjs.org/package/unset-value) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/unset-value.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/unset-value)
3 > Delete nested properties from an object using dot notation.
7 Install with [npm](https://www.npmjs.com/):
10 $ npm install --save unset-value
16 var unset = require('unset-value');
18 var obj = {a: {b: {c: 'd', e: 'f'}}};
21 //=> {a: {b: {e: 'f'}}};
26 ### Updates the object when a property is deleted
35 ### Returns true when a property is deleted
38 unset({a: 'b'}, 'a') // true
41 ### Returns `true` when a property does not exist
43 This is consistent with `delete` behavior in that it does not
44 throw when a property does not exist.
47 unset({a: {b: {c: 'd'}}}, 'd') // true
50 ### delete nested values
53 var one = {a: {b: {c: 'd'}}};
58 var two = {a: {b: {c: 'd'}}};
63 var three = {a: {b: {c: 'd', e: 'f'}}};
64 unset(three, 'a.b.c');
66 //=> {a: {b: {e: 'f'}}}
69 ### throws on invalid args
73 // 'expected an object.'
80 * [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value "Use property paths (`a.b.c`) to get a nested value from an object.")
81 * [get-values](https://www.npmjs.com/package/get-values): Return an array of all values from the given object. | [homepage](https://github.com/jonschlinkert/get-values "Return an array of all values from the given object.")
82 * [omit-value](https://www.npmjs.com/package/omit-value): Omit properties from an object or deeply nested property of an object using object path… [more](https://github.com/jonschlinkert/omit-value) | [homepage](https://github.com/jonschlinkert/omit-value "Omit properties from an object or deeply nested property of an object using object path notation.")
83 * [put-value](https://www.npmjs.com/package/put-value): Update only existing values from an object, works with dot notation paths like `a.b.c` and… [more](https://github.com/tunnckocore/put-value#readme) | [homepage](https://github.com/tunnckocore/put-value#readme "Update only existing values from an object, works with dot notation paths like `a.b.c` and support deep nesting.")
84 * [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.")
85 * [union-value](https://www.npmjs.com/package/union-value): Set an array of unique values as the property of an object. Supports setting deeply… [more](https://github.com/jonschlinkert/union-value) | [homepage](https://github.com/jonschlinkert/union-value "Set an array of unique values as the property of an object. Supports setting deeply nested properties using using object-paths/dot notation.")
86 * [upsert-value](https://www.npmjs.com/package/upsert-value): Update or set nested values and any intermediaries with dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/doowb/upsert-value "Update or set nested values and any intermediaries with dot notation (`'a.b.c'`) paths.")
90 Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
94 | **Commits** | **Contributor** |
96 | 6 | [jonschlinkert](https://github.com/jonschlinkert) |
97 | 2 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
101 _(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
103 To generate the readme, run the following command:
106 $ npm install -g verbose/verb#dev verb-generate-readme && verb
111 Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
114 $ npm install && npm test
121 * [github/jonschlinkert](https://github.com/jonschlinkert)
122 * [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
126 Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
127 Released under the [MIT License](LICENSE).
131 _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 25, 2017._