updateDeep
Sets an item or property or items or properties on a list.
list.updateDeep(newProps)
Recursively updates the properties on the list with newProps
. Properties not in newProps
will be set to undefined
.
var list = new DefineList(["A","B"]);
list.assign({count: 0, skip: 2, foo: {bar: 'zed', a: 'b'}});
list.updateDeep({foo: {bar: 'yay'}});
list.get("count") //-> undefined
list.get("skip") //-> undefined
list.get("foo") // -> {bar: 'yay', a: undefined}
Parameters
- newProps
{Array}
:Properties that need to be updated on the list instance