@dereekb/rxjs 8.0.2 → 8.1.2

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,7 +2,20 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
- ## [8.0.2](https://github.com/dereekb/dbx-components/compare/v8.0.1-dev...v8.0.2) (2022-06-17)
5
+ ## [8.1.2](https://github.com/dereekb/dbx-components/compare/v8.1.1-dev...v8.1.2) (2022-06-19)
6
+
7
+
8
+
9
+ ## [8.1.1](https://github.com/dereekb/dbx-components/compare/v8.1.0-dev...v8.1.1) (2022-06-18)
10
+
11
+
12
+
13
+ # [8.1.0](https://github.com/dereekb/dbx-components/compare/v8.0.1-dev...v8.1.0) (2022-06-18)
14
+
15
+
16
+ ### Features
17
+
18
+ * added jest fail test utilities ([#13](https://github.com/dereekb/dbx-components/issues/13)) ([5891777](https://github.com/dereekb/dbx-components/commit/5891777470a339892c8e7045c24b5dea174b1736))
6
19
 
7
20
 
8
21
 
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@dereekb/rxjs",
3
- "version": "8.0.2",
3
+ "version": "8.1.2",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./src/index.d.ts",
7
7
  "dependencies": {},
8
8
  "peerDependencies": {
9
9
  "rxjs": "^7.0.0",
10
- "@dereekb/util": "8.0.2",
10
+ "@dereekb/util": "8.1.2",
11
11
  "make-error": "^1.3.0",
12
12
  "ts-essentials": "^9.1.2",
13
13
  "extra-set": "^2.2.11",
@@ -18,7 +18,7 @@ export interface OnMatchDeltaConfig<T> {
18
18
  */
19
19
  isMatch?: (a: T, b: T) => boolean;
20
20
  /**
21
- * Whether or not the two values must be emitted consencutively.
21
+ * Whether or not the two values must be emitted consecutively.
22
22
  *
23
23
  * For example, if requiredConsecutive=true and we are waiting for 1 -> 2, and the emissions are 1,0,2, the observable function will not emit 2.
24
24
  */
@@ -38,6 +38,9 @@ function onMatchDelta(config) {
38
38
  fromMatch = isMatch(from, next);
39
39
  value = next;
40
40
  }
41
+ else if (!requireConsecutive) {
42
+ value = acc.value;
43
+ }
41
44
  }
42
45
  return {
43
46
  emit,
@@ -1 +1 @@
1
- {"version":3,"file":"delta.js","sourceRoot":"","sources":["../../../../../../packages/rxjs/src/lib/rxjs/delta.ts"],"names":[],"mappings":";;;AAAA,+BAA+E;AA6C/E;;;;GAIG;AACH,SAAgB,YAAY,CAAI,MAA6B;IAC3D,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAAC;IACtE,MAAM,OAAO,GAAG,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,CAAC,CAAC,CAAI,EAAE,CAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IAEzD,OAAO,CAAC,GAAkB,EAAE,EAAE;QAC5B,OAAO,GAAG,CAAC,IAAI,CACb,IAAA,WAAI,EACF,CAAC,GAAwB,EAAE,IAAO,EAAE,EAAE;YACpC,IAAI,IAAI,GAAY,KAAK,CAAC;YAC1B,IAAI,SAAS,GAAY,GAAG,CAAC,SAAS,CAAC;YACvC,IAAI,KAAS,CAAC;YAEd,4EAA4E;YAC5E,IAAI,GAAG,CAAC,SAAS,EAAE;gBACjB,MAAM,OAAO,GAAG,OAAO,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;gBAElC,IAAI,OAAO,EAAE;oBACX,sDAAsD;oBACtD,SAAS,GAAG,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;oBAErC,gCAAgC;oBAChC,IAAI,GAAG,SAAS,IAAI,OAAO,CAAC;oBAE5B,IAAI,IAAI,EAAE;wBACR,qBAAqB;wBACrB,KAAK,GAAG,IAAI,CAAC;wBAEb,0CAA0C;wBAC1C,SAAS,GAAG,O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DC"}
@@ -1,6 +1,7 @@
1
1
  export * from './array';
2
2
  export * from './boolean';
3
3
  export * from './delta';
4
+ export * from './timeout';
4
5
  export * from './factory';
5
6
  export * from './getter';
6
7
  export * from './lifecycle';
@@ -4,6 +4,7 @@ const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./array"), exports);
5
5
  tslib_1.__exportStar(require("./boolean"), exports);
6
6
  tslib_1.__exportStar(require("./delta"), exports);
7
+ tslib_1.__exportStar(require("./timeout"), exports);
7
8
  tslib_1.__exportStar(require("./factory"), exports);
8
9
  tslib_1.__exportStar(require("./getter"), exports);
9
10
  tslib_1.__exportStar(require("./lifecycle"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/rxjs/src/lib/rxjs/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AACxB,oDAA0B;AAC1B,kDAAwB;AACxB,oDAA0B;AAC1B,mDAAyB;AACzB,sDAA4B;AAC5B,oDAA0B;AAC1B,iDAAuB;AACvB,gDAAsB;AACtB,mDAAyB;AACzB,iDAAuB;AACvB,uDAA6B;AAC7B,qDAA2B;AAC3B,gDAAsB;AACtB,gDAAsB;AACtB,kDAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/rxjs/src/lib/rxjs/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AACxB,oDAA0B;AAC1B,kDAAwB;AACxB,oDAA0B;AAC1B,oDAA0B;AAC1B,mDAAyB;AACzB,sDAA4B;AAC5B,oDAA0B;AAC1B,iDAAuB;AACvB,gDAAsB;AACtB,mDAAyB;AACzB,iDAAuB;AACvB,uDAA6B;AAC7B,qDAA2B;AAC3B,gDAAsB;AACtB,gDAAsB;AACtB,kDAAwB"}
@@ -0,0 +1,4 @@
1
+ import { MonoTypeOperatorFunction } from 'rxjs';
2
+ import { Getter } from '@dereekb/util';
3
+ export declare function tapAfterTimeout<T>(timeoutDelay: number, useFn: () => void): MonoTypeOperatorFunction<T>;
4
+ export declare function throwErrorAfterTimeout<T>(timeoutDelay: number, error: Getter<unknown>): MonoTypeOperatorFunction<T>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.throwErrorAfterTimeout = exports.tapAfterTimeout = void 0;
4
+ const rxjs_1 = require("@dereekb/rxjs");
5
+ const rxjs_2 = require("rxjs");
6
+ function tapAfterTimeout(timeoutDelay, useFn) {
7
+ return (0, rxjs_2.timeout)({
8
+ first: timeoutDelay,
9
+ with: () => (0, rxjs_2.of)(null).pipe((0, rxjs_2.tap)(useFn), (0, rxjs_1.filterMaybe)())
10
+ });
11
+ }
12
+ exports.tapAfterTimeout = tapAfterTimeout;
13
+ function throwErrorAfterTimeout(timeoutDelay, error) {
14
+ return (0, rxjs_2.timeout)({
15
+ first: timeoutDelay,
16
+ with: () => (0, rxjs_2.of)(null).pipe((0, rxjs_2.map)(() => (0, rxjs_2.throwError)(error)), (0, rxjs_1.filterMaybe)())
17
+ });
18
+ }
19
+ exports.throwErrorAfterTimeout = throwErrorAfterTimeout;
20
+ //# sourceMappingURL=timeout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeout.js","sourceRoot":"","sources":["../../../../../../packages/rxjs/src/lib/rxjs/timeout.ts"],"names":[],"mappings":";;;AAAA,wCAA4C;AAC5C,+BAAmF;AAGnF,SAAgB,eAAe,CAAI,YAAoB,EAAE,KAAiB;IACxE,OAAO,IAAA,cAAO,EAAC;QACb,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,GAAG,EAAE,CAAC,IAAA,SAAE,EAAC,IAAoB,CAAC,CAAC,IAAI,CAAC,IAAA,UAAG,EAAC,KAAK,CAAC,EAAE,IAAA,kBAAW,GAAE,CAAC;KACrE,CAAgC,CAAC;AACpC,CAAC;AALD,0CAKC;AAED,SAAgB,sBAAsB,CAAI,YAAoB,EAAE,KAAsB;IACpF,OAAO,IAAA,cAAO,EAAC;QACb,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,GAAG,EAAE,CACT,IAAA,SAAE,EAAC,IAAoB,CAAC,CAAC,IAAI,CAC3B,IAAA,UAAG,EAAC,GAAG,EAAE,CAAC,IAAA,iBAAU,EAAC,KAAK,CAAC,CAAC,EAC5B,IAAA,kBAAW,GAAE,CACd;KACJ,CAAgC,CAAC;AACpC,CAAC;AATD,wDASC"}