An open API service indexing awesome lists of open source software.

https://github.com/aleclarson/mutate


https://github.com/aleclarson/mutate

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

          

# mutate v1.0.0

Safely mutate a property with a multi-part path.

Objects are created on-the-fly and overwrite non-object values!

```js
const mutate = require('mutate')

const obj = {}
mutate(obj, 'a.b', 1)

obj.a // => {b: 1}
```