@jsenv/navi 0.18.11 → 0.18.12
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/dist/jsenv_navi.js +8 -3
- package/dist/jsenv_navi.js.map +3 -3
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -2472,7 +2472,8 @@ const useArraySignalMembership = (...args) => {
|
|
|
2472
2472
|
}
|
|
2473
2473
|
|
|
2474
2474
|
return useMemo(() => {
|
|
2475
|
-
|
|
2475
|
+
const [isMember, add, remove] = arraySignalMembership(...args);
|
|
2476
|
+
return [isMember(), add, remove];
|
|
2476
2477
|
}, args);
|
|
2477
2478
|
};
|
|
2478
2479
|
|
|
@@ -2483,8 +2484,12 @@ const arraySignalMembership = (...args) => {
|
|
|
2483
2484
|
);
|
|
2484
2485
|
}
|
|
2485
2486
|
const [arraySignal, id] = args;
|
|
2486
|
-
|
|
2487
|
-
const isMember =
|
|
2487
|
+
|
|
2488
|
+
const isMember = () => {
|
|
2489
|
+
const array = arraySignal.peek();
|
|
2490
|
+
const is = array.includes(id);
|
|
2491
|
+
return is;
|
|
2492
|
+
};
|
|
2488
2493
|
|
|
2489
2494
|
const add = () => {
|
|
2490
2495
|
const arrayWithId = addIntoArray(arraySignal.peek(), id);
|