@ctx-core/store
Advanced tools
Comparing version 25.1.21 to 26.0.0
# @ctx-core/store | ||
## 26.0.0 | ||
### Major Changes | ||
- move from dist to src directory | ||
### Patch Changes | ||
- Updated dependencies [undefined] | ||
- @ctx-core/array@22.0.0 | ||
- @ctx-core/combinators@7.0.0 | ||
- @ctx-core/function@19.0.0 | ||
- @ctx-core/object@20.0.0 | ||
## 25.1.21 | ||
@@ -476,3 +490,3 @@ | ||
- readable\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\$\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\_C,writable\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\$\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\_C: public get/set \$ | ||
- readable\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\$\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\_C,writable\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\$\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\_C: public get/set \$ | ||
@@ -533,2 +547,2 @@ ## 24.7.7 | ||
- \_readable_set_ctx_set_type->\_readable_set_ctx_set_T,readable_set_ctx_type->readable_set_ctx_T,\_readable_set_a1_set_type->\_readable_set_a1_set_T,\_readable_set_a1_type->\_readable_set_a1_T | ||
- feat: \readable\\\\\\\\\\\\\\\\\\\\\*set_ctx\\\\\\\\\\\\\\\\\\\\\\$\\\\\\\\\\\\\\\\\\\\\*,\\\\\\\\\\\\\\\\\\\\\\_readable_set_a1\$ | ||
- feat: \readable\\\\\\\\\\\\\\\\\\\\\\*set_ctx\\\\\\\\\\\\\\\\\\\\\\\$\\\\\\\\\\\\\\\\\\\\\\*,\\\\\\\\\\\\\\\\\\\\\\\_readable_set_a1\$ |
{ | ||
"name": "@ctx-core/store", | ||
"version": "25.1.21", | ||
"version": "26.0.0", | ||
"description": "ctx-core store", | ||
@@ -19,10 +19,10 @@ "keywords": [ | ||
"author": "Brian Takita", | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"main": "./src/index.js", | ||
"module": "./src/index.js", | ||
"types": "./src/index.d.ts", | ||
"dependencies": { | ||
"@ctx-core/array": "^21.3.3", | ||
"@ctx-core/combinators": "^6.3.3", | ||
"@ctx-core/function": "^18.1.3", | ||
"@ctx-core/object": "^19.3.0", | ||
"@ctx-core/array": "^22.0.0", | ||
"@ctx-core/combinators": "^7.0.0", | ||
"@ctx-core/function": "^19.0.0", | ||
"@ctx-core/object": "^20.0.0", | ||
"svelte": "3.38.2" | ||
@@ -29,0 +29,0 @@ }, |
@@ -10,5 +10,5 @@ import { wrap_a_ } from '@ctx-core/function' | ||
):void { | ||
const store_a1 = wrap_a_<Writable<Val>>(stores) | ||
each(store_a1, (store:Writable<Val>)=>store.set(val)) | ||
const store_a = wrap_a_<Writable<Val>>(stores) | ||
each(store_a, (store:Writable<Val>)=>store.set(val)) | ||
} | ||
export { clear_store as clear__store } |
@@ -7,26 +7,26 @@ import { each, map } from '@ctx-core/array' | ||
/** | ||
* Subscribes to multiple stores. The subscriber fn is called when any of the store_a1 changes. | ||
* Subscribes to multiple stores. The subscriber fn is called when any of the store_a changes. | ||
*/ | ||
export function multi_subscribe<Val extends unknown, Store extends Readable<any> = Readable<any>>( | ||
store_a1:Store[], | ||
fn:(($store_a1:Val[])=>void) | ||
store_a:Store[], | ||
fn:((val_a:Val[])=>void) | ||
):Unsubscriber { | ||
const unsubscribe_a1 = | ||
map<Readable<Val>, Unsubscriber>(store_a1, | ||
const unsubscribe_a = | ||
map<Readable<Val>, Unsubscriber>(store_a, | ||
(store, i)=>subscribe( | ||
store, | ||
($store:Val)=>invoke($store, i) | ||
(val:Val)=>invoke(val, i) | ||
)) | ||
return ()=>each<Unsubscriber>(unsubscribe_a1, unsubscribe=>unsubscribe()) | ||
function invoke($i_store:Val, i:number) { | ||
const all_$store_a1 = | ||
map(store_a1, | ||
return ()=>each<Unsubscriber>(unsubscribe_a, unsubscribe=>unsubscribe()) | ||
function invoke(i_val:Val, i:number) { | ||
const all_val_a = | ||
map(store_a, | ||
(store, j:number)=> | ||
(j === i) | ||
? $i_store | ||
? i_val | ||
: get(store) | ||
) as Val[] | ||
fn(all_$store_a1) | ||
fn(all_val_a) | ||
} | ||
} | ||
export { multi_subscribe as subscribe__multi } |
@@ -25,5 +25,5 @@ { | ||
"rootDir": "src", | ||
"outDir": "dist", | ||
"mapRoot": "dist", | ||
"declarationDir": "dist", | ||
"outDir": "src", | ||
"mapRoot": "src", | ||
"declarationDir": "src", | ||
"lib": [ | ||
@@ -30,0 +30,0 @@ "dom", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
82047
1
+ Added@ctx-core/array@22.3.0(transitive)
+ Added@ctx-core/combinators@7.0.10(transitive)
+ Added@ctx-core/function@19.2.0(transitive)
+ Added@ctx-core/object@20.5.0(transitive)
+ Added@ctx-core/set@11.0.16(transitive)
- Removed@ctx-core/array@21.3.3(transitive)
- Removed@ctx-core/combinators@6.3.3(transitive)
- Removed@ctx-core/function@18.1.3(transitive)
- Removed@ctx-core/object@19.3.0(transitive)
- Removed@ctx-core/set@10.0.5(transitive)
Updated@ctx-core/array@^22.0.0
Updated@ctx-core/combinators@^7.0.0
Updated@ctx-core/function@^19.0.0
Updated@ctx-core/object@^20.0.0