@superutils/rx 0.1.7 → 0.1.9

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/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
- * ```typescript
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
@@ -653,7 +653,7 @@ declare const forceUpdateCache$: Subject<string | boolean | string[]>;
653
653
  * console.log('Saving to database...', data)
654
654
  * })
655
655
  * // unsubscribe from subject
656
- * setTimeout(()=> sub.unsbuscribe(), 1000)
656
+ * setTimeout(()=> sub.unsubscribe(), 1000)
657
657
  *
658
658
  * // add an entry to storage
659
659
  * storage.set('bob', { age: 99, id: 'bob', name: 'Bob' })
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
- * ```typescript
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
@@ -653,7 +653,7 @@ declare const forceUpdateCache$: Subject<string | boolean | string[]>;
653
653
  * console.log('Saving to database...', data)
654
654
  * })
655
655
  * // unsubscribe from subject
656
- * setTimeout(()=> sub.unsbuscribe(), 1000)
656
+ * setTimeout(()=> sub.unsubscribe(), 1000)
657
657
  *
658
658
  * // add an entry to storage
659
659
  * storage.set('bob', { age: 99, id: 'bob', name: 'Bob' })
package/package.json CHANGED
@@ -2,8 +2,8 @@
2
2
  "author": "Toufiqur Rahaman Chowdhury",
3
3
  "description": "A set of small, focused utilities for working with RxJS observables and subjects.",
4
4
  "dependencies": {
5
- "@superutils/core": "^1.2.12",
6
- "@superutils/promise": "^1.3.11",
5
+ "@superutils/core": "^1.2.13",
6
+ "@superutils/promise": "^1.3.12",
7
7
  "@types/react": "^18.0.0",
8
8
  "react": ">=16.8.0",
9
9
  "rxjs": "^7.8.2"
@@ -49,6 +49,6 @@
49
49
  "module": "./dist/index.js",
50
50
  "type": "module",
51
51
  "types": "./dist/index.d.ts",
52
- "version": "0.1.7",
53
- "gitHead": "22050737e69a5e7a6fea402c2e5540f3d0c2375c"
52
+ "version": "0.1.9",
53
+ "gitHead": "1661eeeed9d00cb6b960e76563cdd3cee2cac8a7"
54
54
  }