https://github.com/aleclarson/mutate
https://github.com/aleclarson/mutate
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aleclarson/mutate
- Owner: aleclarson
- License: mit
- Created: 2017-12-05T21:43:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-05T16:58:55.000Z (over 7 years ago)
- Last Synced: 2025-03-11T12:33:33.361Z (over 1 year ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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}
```