@superutils/rx 0.1.7 → 0.1.8
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/browser/index.min.js.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -405,7 +405,7 @@ interface IDataStorage<Key, Value, CacheDisabled extends boolean = false> {
|
|
|
405
405
|
*
|
|
406
406
|
* @example
|
|
407
407
|
* #### Search for users in a specific city
|
|
408
|
-
* ```
|
|
408
|
+
* ```javascript
|
|
409
409
|
* import { DataStorage } from '@superutils/rx'
|
|
410
410
|
*
|
|
411
411
|
* const storage = new DataStorage('users', {
|
|
@@ -593,7 +593,7 @@ declare const forceUpdateCache$: Subject<string | boolean | string[]>;
|
|
|
593
593
|
* import { DataStorage } from '@superutils/rx'
|
|
594
594
|
* import fetch from '@superutils/fetch'
|
|
595
595
|
*
|
|
596
|
-
* const { products } = await fetch('[DUMMYJSON-DOT-COM]/products')
|
|
596
|
+
* const { products } = await fetch.get('[DUMMYJSON-DOT-COM]/products')
|
|
597
597
|
* const storage = new DataStorage('products', {
|
|
598
598
|
* initialValue: new Map(products.map(p => [p.id, p])) // convert to Map
|
|
599
599
|
* })
|
|
@@ -619,7 +619,7 @@ declare const forceUpdateCache$: Subject<string | boolean | string[]>;
|
|
|
619
619
|
* globalThis.localStorage = new LocalStorage('./data', 1e7)
|
|
620
620
|
*
|
|
621
621
|
* const storage = new DataStorage('products')
|
|
622
|
-
* const { products } = await fetch('[DUMMYJSON-DOT-COM]/products')
|
|
622
|
+
* const { products } = await fetch.get('[DUMMYJSON-DOT-COM]/products')
|
|
623
623
|
* // save all items to storage
|
|
624
624
|
* storage.setAll(
|
|
625
625
|
* new Map(products.map(p => [p.id, p])), // convert to Map
|
package/dist/index.d.ts
CHANGED
|
@@ -405,7 +405,7 @@ interface IDataStorage<Key, Value, CacheDisabled extends boolean = false> {
|
|
|
405
405
|
*
|
|
406
406
|
* @example
|
|
407
407
|
* #### Search for users in a specific city
|
|
408
|
-
* ```
|
|
408
|
+
* ```javascript
|
|
409
409
|
* import { DataStorage } from '@superutils/rx'
|
|
410
410
|
*
|
|
411
411
|
* const storage = new DataStorage('users', {
|
|
@@ -593,7 +593,7 @@ declare const forceUpdateCache$: Subject<string | boolean | string[]>;
|
|
|
593
593
|
* import { DataStorage } from '@superutils/rx'
|
|
594
594
|
* import fetch from '@superutils/fetch'
|
|
595
595
|
*
|
|
596
|
-
* const { products } = await fetch('[DUMMYJSON-DOT-COM]/products')
|
|
596
|
+
* const { products } = await fetch.get('[DUMMYJSON-DOT-COM]/products')
|
|
597
597
|
* const storage = new DataStorage('products', {
|
|
598
598
|
* initialValue: new Map(products.map(p => [p.id, p])) // convert to Map
|
|
599
599
|
* })
|
|
@@ -619,7 +619,7 @@ declare const forceUpdateCache$: Subject<string | boolean | string[]>;
|
|
|
619
619
|
* globalThis.localStorage = new LocalStorage('./data', 1e7)
|
|
620
620
|
*
|
|
621
621
|
* const storage = new DataStorage('products')
|
|
622
|
-
* const { products } = await fetch('[DUMMYJSON-DOT-COM]/products')
|
|
622
|
+
* const { products } = await fetch.get('[DUMMYJSON-DOT-COM]/products')
|
|
623
623
|
* // save all items to storage
|
|
624
624
|
* storage.setAll(
|
|
625
625
|
* new Map(products.map(p => [p.id, p])), // convert to Map
|
package/package.json
CHANGED