vue-set-value
Create nested values and any intermediaries on vue reactive objects using dot notation (
'a.b.c'
) paths.
This project is only fork of great package set-value made by Jon Schlinkert
Install
Install with npm:
$ npm install --save vue-set-value
Usage
var vueDeepSet = ;;
Params
object
{object}: The object to setvalue
onprop
{string}: The property to set. Dot-notation may be used.value
{any}: The value to set onobject[prop]
Examples
Updates and returns the given object:
;console;//=> { a: { b: { c: 'd' } } }
Escaping
Escaping with backslashes
Prevent set-value from splitting on a dot by prefixing it with backslashes:
console;//=> { 'a.b': { c: 'd' } } console;//=> { 'a.b.c': 'd' }
License
Copyright © 2018, Yaroslav Dobzhanskij. Copyright © 2018, Jon Schlinkert. Released under the MIT License.