{"name":"unset-value","description":"Delete nested properties from an object using dot notation.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/unset-value","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/unset-value.git"},"bugs":{"url":"https://github.com/jonschlinkert/unset-value/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"has-value":"^0.2.0","isobject":"^2.0.0"},"devDependencies":{"mocha":"*","should":"*"},"keywords":[],"verb":{"related":{"list":["get-value","get-values","omit-value","put-value","set-value","union-value","upsert-value"]}},"_id":"unset-value@0.1.0","_shasum":"fbaafe2fe1f17a9a58e25d1fc48c58fb47cf0ec6","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"fbaafe2fe1f17a9a58e25d1fc48c58fb47cf0ec6","tarball":"http://registry-npm.ywwl.com/unset-value/download/unset-value-0.1.0.tgz","integrity":"sha512-tGIJveJZ5JOJETKQQRIWzwIc3s9PQP83PJmgigP8dM3EnFiDUHInUHmBWgT4dGda36AaWB4lgW98HF2Ei26l7Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEWRp09Xncn4dG9J1chtS2D5eyGbh6eV5QmigXuZP6mLAiBsuCF4p+oKrpr8krFOMZX89Dp3zSX+x2tVLMSOg7/CLA=="}],"size":2455,"noattachment":false,"key":"/unset-value/-/unset-value-0.1.0.tgz"},"directories":{},"readme":"# 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) \n\n> Delete nested properties from an object using dot notation.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save unset-value\n```\n\n## Usage\n\n```js\nvar unset = require('unset-value');\nunset(obj, prop);\n```\n\n### Params\n\n* `obj` **{object}**: The object to unset `prop` on\n* `prop` **{string | string[]}**: The property to unset. Dot-notation may be used or an array of nested properties.\n\n## Examples\n\n### Updates the object when a property is deleted\n\n```js\nvar obj = {a: 'b'};\nunset(obj, 'a');\nconsole.log(obj);\n//=> {}\n```\n\n### Returns true when a property is deleted\n\n```js\nunset({a: 'b'}, 'a') // true\n```\n\n### Returns `true` when a property does not exist\n\nThis is consistent with `delete` behavior in that it does not\nthrow when a property does not exist.\n\n```js\nunset({a: {b: {c: 'd'}}}, 'd') // true\n```\n\n### delete nested values\n\n```js\nvar one = {a: {b: {c: 'd'}}};\nunset(one, 'a.b');\nconsole.log(one);\n//=> {a: {}}\n\nvar two = {a: {b: {c: 'd'}}};\nunset(two, ['a', 'b', 'c']);\nconsole.log(two);\n//=> {a: {b: {}}}\n\nvar three = {a: {b: {c: 'd', e: 'f'}}};\nunset(three, 'a.b.c');\nconsole.log(three);\n//=> {a: {b: {e: 'f'}}}\n```\n\n### throws on invalid args\n\n```js\nunset();\n// 'expected an object.'\n```\n\n## About\n<details>\n  <summary><strong>Contributing</strong></summary>\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n</details>\n\n<details>\n  <summary><strong>Running Tests</strong></summary>\n\nRunning 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:\n\n```sh\n$ npm install && npm test\n```\n\n</details>\n\n<details>\n  <summary><strong>Building docs</strong></summary>\n\n_(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.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n</details>\n\n### Related projects\n\nYou might also be interested in these projects: \n\n- [get-value](https://www.npmjs.com/package/get-value): Use property paths like 'a.b.c' to get a nested value from an object. Even works… [more](https://github.com/jonschlinkert/get-value) | [homepage](https://github.com/jonschlinkert/get-value \"Use property paths like 'a.b.c' to get a nested value from an object. Even works when keys have dots in them (no other dot-prop library can do this!).\")\n- [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.\")\n- [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.\")\n- [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.\")\n- [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.\")\n- [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.\")\n- [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.\")  \n\n### Contributors\n| **Commits** | **Contributor** |  \n| --- | --- |  \n| 11 | [jonschlinkert](https://github.com/jonschlinkert) |  \n| 4  | [danez](https://github.com/danez) |  \n| 2  | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |  \n| 1  | [TrySound](https://github.com/TrySound) |  \n| 1  | [bluelovers](https://github.com/bluelovers) |  \n\n### Author\n**Jon Schlinkert**\n+ [GitHub Profile](https://github.com/jonschlinkert)\n+ [Twitter Profile](https://twitter.com/jonschlinkert)\n+ [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n\n### License\nCopyright © 2021, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on March 18, 2021._\n\n","publish_time":1440662385273,"_cnpm_publish_time":1440662385273,"dist-tags":{"latest":"2.0.1"}}