@jscutlery/operators 2.1.2 → 2.1.3

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/CHANGELOG.md CHANGED
@@ -2,6 +2,38 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [2.1.3](https://github.com/jscutlery/devkit/compare/operators-2.1.2...operators-2.1.3) (2023-10-25)
6
+
7
+
8
+
9
+ ## [2.1.3](https://github.com/jscutlery/devkit/compare/operators-2.1.2...operators-2.1.3) (2023-10-25)
10
+
11
+
12
+
13
+ ## [2.1.3](https://github.com/jscutlery/devkit/compare/operators-2.1.2...operators-2.1.3) (2023-10-25)
14
+
15
+
16
+
17
+ ## [2.1.3](https://github.com/jscutlery/devkit/compare/operators-2.1.2...operators-2.1.3) (2023-10-25)
18
+
19
+
20
+
21
+ ## [2.1.3](https://github.com/jscutlery/devkit/compare/operators-2.1.2...operators-2.1.3) (2023-10-25)
22
+
23
+
24
+
25
+ ## [2.1.3](https://github.com/jscutlery/devkit/compare/operators-2.1.2...operators-2.1.3) (2023-10-25)
26
+
27
+
28
+
29
+ ## [2.1.3](https://github.com/jscutlery/devkit/compare/operators-2.1.2...operators-2.1.3) (2023-10-25)
30
+
31
+
32
+
33
+ ## [2.1.3](https://github.com/jscutlery/devkit/compare/operators-2.1.2...operators-2.1.3) (2023-10-25)
34
+
35
+
36
+
5
37
  ## [2.1.2](https://github.com/jscutlery/devkit/compare/operators-2.1.1...operators-2.1.2) (2023-05-22)
6
38
 
7
39
 
package/index.cjs.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/index";
@@ -1,6 +1,14 @@
1
1
  import { Observable, ReplaySubject } from 'rxjs';
2
2
  import { map, debounce, materialize, scan, startWith } from 'rxjs/operators';
3
3
 
4
+ /**
5
+ * @description creates a derivated state from the source observable.
6
+ *
7
+ * @example source$.pipe(suspensify())
8
+ *
9
+ * @returns Observable<SuspenseLax<T> | SuspenseStrict<T>>
10
+ */
11
+
4
12
  function suspensify({
5
13
  strict = true
6
14
  } = {}) {
@@ -15,6 +23,7 @@ function suspensify({
15
23
  );
16
24
  };
17
25
  }
26
+
18
27
  /**
19
28
  * This is the initial state of the Suspense.
20
29
  * It is exposed for convenience and edge cases where the initial state must be set initially.
@@ -33,6 +42,7 @@ function _coalesceFirstEmittedValue() {
33
42
  const isReadySubject = new ReplaySubject(1);
34
43
  const subscription = source$.pipe( /* Wait for all synchronous processing to be done. */
35
44
  debounce(() => isReadySubject)).subscribe(observer);
45
+
36
46
  /* Sync emitted values have been processed now.
37
47
  * Mark source as ready and emit last computed state. */
38
48
  isReadySubject.next(undefined);
@@ -40,6 +50,7 @@ function _coalesceFirstEmittedValue() {
40
50
  });
41
51
  };
42
52
  }
53
+
43
54
  /* Use values as types for better type checking. */
44
55
  const TRUE = true;
45
56
  const FALSE = false;
package/package.json CHANGED
@@ -1,16 +1,12 @@
1
1
  {
2
2
  "name": "@jscutlery/operators",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "repository": {
5
5
  "url": "https://github.com/jscutlery/devkit"
6
6
  },
7
7
  "peerDependencies": {
8
- "rxjs": ">=6.0.0",
9
- "@jest/globals": "29.5.0"
8
+ "rxjs": ">=6.0.0"
10
9
  },
11
- "module": "./index.js",
12
- "main": "./index.cjs",
13
- "type": "module",
14
- "types": "./src/index.d.ts",
15
- "dependencies": {}
10
+ "module": "./index.esm.js",
11
+ "main": "./index.cjs.js"
16
12
  }
File without changes