@jscrpt/common 3.2.0 → 3.3.0
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 +7 -0
- package/es/rxjs/src/index.js.map +1 -1
- package/es/rxjs/src/index.mjs +1 -0
- package/es/rxjs/src/utils/common.js.map +1 -0
- package/es/rxjs/src/utils/common.mjs +10 -0
- package/es2015/rxjs/src/index.js +1 -0
- package/es2015/rxjs/src/index.js.map +1 -1
- package/es2015/rxjs/src/utils/common.js +10 -0
- package/es2015/rxjs/src/utils/common.js.map +1 -0
- package/es2020/rxjs/src/index.js +1 -0
- package/es2020/rxjs/src/index.js.map +1 -1
- package/es2020/rxjs/src/utils/common.js +10 -0
- package/es2020/rxjs/src/utils/common.js.map +1 -0
- package/es5/rxjs/src/index.js +1 -0
- package/es5/rxjs/src/index.js.map +1 -1
- package/es5/rxjs/src/utils/common.js +10 -0
- package/es5/rxjs/src/utils/common.js.map +1 -0
- package/module/rxjs/src/index.cjs +1 -0
- package/module/rxjs/src/index.js.map +1 -1
- package/module/rxjs/src/utils/common.cjs +14 -0
- package/module/rxjs/src/utils/common.js.map +1 -0
- package/package.json +1 -1
- package/rxjs/src/index.d.ts +1 -0
- package/rxjs/src/index.d.ts.map +1 -1
- package/rxjs/src/utils/common.d.ts +8 -0
- package/rxjs/src/utils/common.d.ts.map +1 -0
- package/version.bak +1 -1
package/changelog.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Version 3.3.0 (2022-10-28)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- *subpackage* `@jscrpt/common/rxjs`
|
|
8
|
+
- new `lastValueFrom` function, which calls rxjs `lastValueFrom` with empty value `undefined` or provided emptyValue
|
|
9
|
+
|
|
3
10
|
## Version 3.2.0 (2022-10-25)
|
|
4
11
|
|
|
5
12
|
### Features
|
package/es/rxjs/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../rxjs/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC","sourcesContent":["export * from './types/async';\nexport * from './utils/async';\n"]}
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../rxjs/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './types/async';\nexport * from './utils/async';\nexport * from './utils/common';\n"]}
|
package/es/rxjs/src/index.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.mjs","sourceRoot":"","sources":["../../../../rxjs/src/utils/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,IAAI,iBAAiB,EAAa,MAAM,MAAM,CAAC;AAEpE;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAA8B,MAA2B,EAAE,UAAmB;IAEvG,OAAO,iBAAiB,CAAkB,MAAM,EAAE,EAAC,YAAY,EAAE,UAAoB,EAAC,CAAC,CAAC;AAC5F,CAAC","sourcesContent":["import {lastValueFrom as rxjsLastValueFrom, Observable} from 'rxjs';\n\n/**\n * Method calls rxjs `lastValueFrom` with empty value `undefined` or provided emptyValue\n * @param source - Observable source to be processed\n * @param emptyValue - Empty value that is returned in case of `EmptyError`\n */\nexport function lastValueFrom<TResult, TEmpty = undefined>(source: Observable<TResult>, emptyValue?: TEmpty): Promise<TResult|TEmpty>\n{\n return rxjsLastValueFrom<TResult, TEmpty>(source, {defaultValue: emptyValue as TEmpty});\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { lastValueFrom as rxjsLastValueFrom } from 'rxjs';
|
|
2
|
+
/**
|
|
3
|
+
* Method calls rxjs `lastValueFrom` with empty value `undefined` or provided emptyValue
|
|
4
|
+
* @param source - Observable source to be processed
|
|
5
|
+
* @param emptyValue - Empty value that is returned in case of `EmptyError`
|
|
6
|
+
*/
|
|
7
|
+
export function lastValueFrom(source, emptyValue) {
|
|
8
|
+
return rxjsLastValueFrom(source, { defaultValue: emptyValue });
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=common.js.map
|
package/es2015/rxjs/src/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../rxjs/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC","sourcesContent":["export * from './types/async';\nexport * from './utils/async';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../rxjs/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './types/async';\nexport * from './utils/async';\nexport * from './utils/common';\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { lastValueFrom as rxjsLastValueFrom } from 'rxjs';
|
|
2
|
+
/**
|
|
3
|
+
* Method calls rxjs `lastValueFrom` with empty value `undefined` or provided emptyValue
|
|
4
|
+
* @param source - Observable source to be processed
|
|
5
|
+
* @param emptyValue - Empty value that is returned in case of `EmptyError`
|
|
6
|
+
*/
|
|
7
|
+
export function lastValueFrom(source, emptyValue) {
|
|
8
|
+
return rxjsLastValueFrom(source, { defaultValue: emptyValue });
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../rxjs/src/utils/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,IAAI,iBAAiB,EAAa,MAAM,MAAM,CAAC;AAEpE;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAA8B,MAA2B,EAAE,UAAmB;IAEvG,OAAO,iBAAiB,CAAkB,MAAM,EAAE,EAAC,YAAY,EAAE,UAAoB,EAAC,CAAC,CAAC;AAC5F,CAAC","sourcesContent":["import {lastValueFrom as rxjsLastValueFrom, Observable} from 'rxjs';\n\n/**\n * Method calls rxjs `lastValueFrom` with empty value `undefined` or provided emptyValue\n * @param source - Observable source to be processed\n * @param emptyValue - Empty value that is returned in case of `EmptyError`\n */\nexport function lastValueFrom<TResult, TEmpty = undefined>(source: Observable<TResult>, emptyValue?: TEmpty): Promise<TResult|TEmpty>\n{\n return rxjsLastValueFrom<TResult, TEmpty>(source, {defaultValue: emptyValue as TEmpty});\n}\n"]}
|
package/es2020/rxjs/src/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../rxjs/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC","sourcesContent":["export * from './types/async';\nexport * from './utils/async';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../rxjs/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './types/async';\nexport * from './utils/async';\nexport * from './utils/common';\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { lastValueFrom as rxjsLastValueFrom } from 'rxjs';
|
|
2
|
+
/**
|
|
3
|
+
* Method calls rxjs `lastValueFrom` with empty value `undefined` or provided emptyValue
|
|
4
|
+
* @param source - Observable source to be processed
|
|
5
|
+
* @param emptyValue - Empty value that is returned in case of `EmptyError`
|
|
6
|
+
*/
|
|
7
|
+
export function lastValueFrom(source, emptyValue) {
|
|
8
|
+
return rxjsLastValueFrom(source, { defaultValue: emptyValue });
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../rxjs/src/utils/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,IAAI,iBAAiB,EAAa,MAAM,MAAM,CAAC;AAEpE;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAA8B,MAA2B,EAAE,UAAmB;IAEvG,OAAO,iBAAiB,CAAkB,MAAM,EAAE,EAAC,YAAY,EAAE,UAAoB,EAAC,CAAC,CAAC;AAC5F,CAAC","sourcesContent":["import {lastValueFrom as rxjsLastValueFrom, Observable} from 'rxjs';\n\n/**\n * Method calls rxjs `lastValueFrom` with empty value `undefined` or provided emptyValue\n * @param source - Observable source to be processed\n * @param emptyValue - Empty value that is returned in case of `EmptyError`\n */\nexport function lastValueFrom<TResult, TEmpty = undefined>(source: Observable<TResult>, emptyValue?: TEmpty): Promise<TResult|TEmpty>\n{\n return rxjsLastValueFrom<TResult, TEmpty>(source, {defaultValue: emptyValue as TEmpty});\n}\n"]}
|
package/es5/rxjs/src/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../rxjs/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC","sourcesContent":["export * from './types/async';\nexport * from './utils/async';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../rxjs/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './types/async';\nexport * from './utils/async';\nexport * from './utils/common';\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { lastValueFrom as rxjsLastValueFrom } from 'rxjs';
|
|
2
|
+
/**
|
|
3
|
+
* Method calls rxjs `lastValueFrom` with empty value `undefined` or provided emptyValue
|
|
4
|
+
* @param source - Observable source to be processed
|
|
5
|
+
* @param emptyValue - Empty value that is returned in case of `EmptyError`
|
|
6
|
+
*/
|
|
7
|
+
export function lastValueFrom(source, emptyValue) {
|
|
8
|
+
return rxjsLastValueFrom(source, { defaultValue: emptyValue });
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../rxjs/src/utils/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,IAAI,iBAAiB,EAAa,MAAM,MAAM,CAAC;AAEpE;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAA8B,MAA2B,EAAE,UAAmB;IAEvG,OAAO,iBAAiB,CAAkB,MAAM,EAAE,EAAC,YAAY,EAAE,UAAoB,EAAC,CAAC,CAAC;AAC5F,CAAC","sourcesContent":["import {lastValueFrom as rxjsLastValueFrom, Observable} from 'rxjs';\n\n/**\n * Method calls rxjs `lastValueFrom` with empty value `undefined` or provided emptyValue\n * @param source - Observable source to be processed\n * @param emptyValue - Empty value that is returned in case of `EmptyError`\n */\nexport function lastValueFrom<TResult, TEmpty = undefined>(source: Observable<TResult>, emptyValue?: TEmpty): Promise<TResult|TEmpty>\n{\n return rxjsLastValueFrom<TResult, TEmpty>(source, {defaultValue: emptyValue as TEmpty});\n}\n"]}
|
|
@@ -3,4 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./types/async.cjs"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./utils/async.cjs"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./utils/common.cjs"), exports);
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../rxjs/src/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B;AAC9B,wDAA8B","sourcesContent":["export * from './types/async';\nexport * from './utils/async';\n"]}
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../rxjs/src/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B;AAC9B,wDAA8B;AAC9B,yDAA+B","sourcesContent":["export * from './types/async';\nexport * from './utils/async';\nexport * from './utils/common';\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lastValueFrom = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
/**
|
|
6
|
+
* Method calls rxjs `lastValueFrom` with empty value `undefined` or provided emptyValue
|
|
7
|
+
* @param source - Observable source to be processed
|
|
8
|
+
* @param emptyValue - Empty value that is returned in case of `EmptyError`
|
|
9
|
+
*/
|
|
10
|
+
function lastValueFrom(source, emptyValue) {
|
|
11
|
+
return (0, rxjs_1.lastValueFrom)(source, { defaultValue: emptyValue });
|
|
12
|
+
}
|
|
13
|
+
exports.lastValueFrom = lastValueFrom;
|
|
14
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.cjs","sourceRoot":"","sources":["../../../../rxjs/src/utils/common.ts"],"names":[],"mappings":";;;AAAA,+BAAoE;AAEpE;;;;GAIG;AACH,SAAgB,aAAa,CAA8B,MAA2B,EAAE,UAAmB;IAEvG,OAAO,IAAA,oBAAiB,EAAkB,MAAM,EAAE,EAAC,YAAY,EAAE,UAAoB,EAAC,CAAC,CAAC;AAC5F,CAAC;AAHD,sCAGC","sourcesContent":["import {lastValueFrom as rxjsLastValueFrom, Observable} from 'rxjs';\n\n/**\n * Method calls rxjs `lastValueFrom` with empty value `undefined` or provided emptyValue\n * @param source - Observable source to be processed\n * @param emptyValue - Empty value that is returned in case of `EmptyError`\n */\nexport function lastValueFrom<TResult, TEmpty = undefined>(source: Observable<TResult>, emptyValue?: TEmpty): Promise<TResult|TEmpty>\n{\n return rxjsLastValueFrom<TResult, TEmpty>(source, {defaultValue: emptyValue as TEmpty});\n}\n"]}
|
package/package.json
CHANGED
package/rxjs/src/index.d.ts
CHANGED
package/rxjs/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
/**
|
|
3
|
+
* Method calls rxjs `lastValueFrom` with empty value `undefined` or provided emptyValue
|
|
4
|
+
* @param source - Observable source to be processed
|
|
5
|
+
* @param emptyValue - Empty value that is returned in case of `EmptyError`
|
|
6
|
+
*/
|
|
7
|
+
export declare function lastValueFrom<TResult, TEmpty = undefined>(source: Observable<TResult>, emptyValue?: TEmpty): Promise<TResult | TEmpty>;
|
|
8
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,UAAU,EAAC,MAAM,MAAM,CAAC;AAEpE;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAC,MAAM,CAAC,CAGpI"}
|
package/version.bak
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.
|
|
1
|
+
3.3.0
|