|
@@ -294,14 +294,14 @@ In case you don't pass the `fn` argument, the action creator only creates `{type
|
|
|
### `cowWorkshop(keys, fn = x => x)(obj, [options])`
|
|
|
|
|
|
This is multipurpose enumerate-and-act function to manipulate objects
|
|
|
-using `cowValueModel`. The `options` argument can contain these additional fields:
|
|
|
+using `deget` and `decow`. The `options` argument can contain these additional fields:
|
|
|
- `result` -- where to put elements (`obj` by default),
|
|
|
- `resultKeys` -- what keys to use to put into `result` (`keys` by default)
|
|
|
- `diff` -- where to put diffing elements (`undefined` by default)
|
|
|
|
|
|
Function enumerates over keys and performs
|
|
|
"get key from obj, call fn on value, put transformed value into resultKey in result"
|
|
|
-operations over them, using `cowValueModel` for getting as well as putting.
|
|
|
+operations over them, using `deget` for getting and `decow` for putting.
|
|
|
Additionally, if putting actually resulted in change,
|
|
|
the result key and value is also put into `diff`.
|
|
|
It then returns `{result, diff}` object.
|