# assign-value

> Assign a value or extend a deeply nested property of an object using object path notation.

Latest version **0.1.2** (published 2015-10-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install assign-value
pnpm add assign-value
yarn add assign-value
bun add assign-value
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2015-10-02 |
| First published | 2015-07-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | assign, dot, extend, get, has, merge, nested, notation, object, path, prop, property, set, value |

## Links

- npm: https://www.npmjs.com/package/assign-value
- Repository: https://github.com/jonschlinkert/assign-value
- Issues: https://github.com/jonschlinkert/assign-value/issues
- npm.io page: https://npm.io/package/assign-value

## Dependencies (5)

- [get-value](https://npm.io/package/get-value.md) ^1.1.5
- [set-value](https://npm.io/package/set-value.md) ^0.2.0
- [lazy-cache](https://npm.io/package/lazy-cache.md) ^0.2.3
- [is-extendable](https://npm.io/package/is-extendable.md) ^0.1.1
- [extend-shallow](https://npm.io/package/extend-shallow.md) ^2.0.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 0.1.2 (latest) — 2015-10-02
- 0.1.1 — 2015-10-02
- 0.1.0 — 2015-07-08

## README

# assign-value [![NPM version](https://badge.fury.io/js/assign-value.svg)](http://badge.fury.io/js/assign-value)

> Assign a value or extend a deeply nested property of an object using object path notation.

## Install

Install with [npm](https://www.npmjs.com/)

```sh
$ npm i assign-value --save
```

## Usage

```js
var assign = require('assign-value');

var obj = {};
assign(obj, 'foo', {a: 'b'})
// obj.foo ==> {a: 'b'}

var obj = {foo: {a: 'b'}};
assign(obj, 'foo', {c: 'd'})
// obj.foo ==> {a: 'b', c: 'd'}

var obj = {};
assign(obj, 'a.b.c', {one: 'two'});
assign(obj, 'a.b.c', {three: 'four'});
// obj.a.b.c ==> {one: 'two', three: 'four'}
```

## Related projects

* [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)
* [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://www.npmjs.com/package/has-value) | [homepage](https://github.com/jonschlinkert/has-value)
* [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)
* [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://www.npmjs.com/package/union-value) | [homepage](https://github.com/jonschlinkert/union-value)

## Running tests

Install dev dependencies:

```sh
$ npm i -d && npm test
```

## Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/assign-value/issues/new).

## Author

**Jon Schlinkert**

+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

## License

Copyright © 2015 Jon Schlinkert
Released under the MIT license.

***

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 02, 2015._

---
_Source: https://npm.io/package/assign-value · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
