@manyducks.co/dolla 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +4 -4
- package/lib/index.js.map +2 -2
- package/lib/signals.d.ts +4 -10
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -717,12 +717,12 @@ function createSignal(initialValue, options) {
|
|
|
717
717
|
};
|
|
718
718
|
}
|
|
719
719
|
};
|
|
720
|
-
function setValue(
|
|
720
|
+
function setValue(action) {
|
|
721
721
|
let value;
|
|
722
|
-
if (typeof
|
|
723
|
-
value =
|
|
722
|
+
if (typeof action === "function") {
|
|
723
|
+
value = action(currentValue);
|
|
724
724
|
} else {
|
|
725
|
-
value =
|
|
725
|
+
value = action;
|
|
726
726
|
}
|
|
727
727
|
if (!equal(value, currentValue)) {
|
|
728
728
|
currentValue = value;
|