|
@@ -191,7 +191,7 @@ using `[...obj]`, not using `{...obj}`.
|
|
That way you can create eg. `const c = cowValueObject("person", 34, "name")`
|
|
That way you can create eg. `const c = cowValueObject("person", 34, "name")`
|
|
to access `obj.person[34].name` with `c(obj)` / `c(obj, val)`.
|
|
to access `obj.person[34].name` with `c(obj)` / `c(obj, val)`.
|
|
|
|
|
|
-### `typedAction(type, fn)`
|
|
|
|
|
|
+### `typedAction(type, [fn])`
|
|
|
|
|
|
This creates an action creator function that amends existing `fn` by:
|
|
This creates an action creator function that amends existing `fn` by:
|
|
- adding a `type` property to the result, as well as
|
|
- adding a `type` property to the result, as well as
|
|
@@ -213,6 +213,9 @@ since `answerQuestion.TYPE === "answer question"`.
|
|
IOW, this removes the two-space problem of having `const FOO_BAR_TYPE`
|
|
IOW, this removes the two-space problem of having `const FOO_BAR_TYPE`
|
|
as well as `fooBar` action creator.
|
|
as well as `fooBar` action creator.
|
|
|
|
|
|
|
|
+
|
|
|
|
+In case you don't pass the `fn` argument, the action creator only creates `{type}`.
|
|
|
|
+
|
|
### `cowWorkshop(keys, fn = x => x)(obj, [options])`
|
|
### `cowWorkshop(keys, fn = x => x)(obj, [options])`
|
|
|
|
|
|
This is multipurpose enumerate-and-act function to manipulate objects
|
|
This is multipurpose enumerate-and-act function to manipulate objects
|