update-struct
Update key/value pairs in an observ-struct
Install
$ npm install --save update-struct
Usage
var updateStruct = var Observ = var state = //=> {foo: 2}
API
updateStruct(struct, [data])
-> struct
/ function
struct
Required
Type: function
An observable struct.
data
Type: object
The data to use to update the struct. All keys must have already been defined as observables in the struct. If data
is omitted, a partially applied function that takes a data
argument will be returned.
License
MIT © Ben Drucker