@clipboard-health/util-ts 0.11.3 → 0.11.5
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 +4 -0
- package/package.json +1 -1
- package/src/index.d.ts +0 -1
- package/src/index.d.ts.map +1 -1
- package/src/index.js +12 -26
- package/src/index.js.map +1 -1
- package/src/lib/money.d.ts +0 -12
- package/src/lib/money.d.ts.map +0 -1
- package/src/lib/money.js +0 -21
- package/src/lib/money.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.11.5](https://github.com/ClipboardHealth/cbh-core/compare/util-ts-0.11.4...util-ts-0.11.5) (2023-12-04)
|
|
6
|
+
|
|
7
|
+
## [0.11.4](https://github.com/ClipboardHealth/cbh-core/compare/util-ts-0.11.3...util-ts-0.11.4) (2023-11-06)
|
|
8
|
+
|
|
5
9
|
## [0.11.3](https://github.com/ClipboardHealth/cbh-core/compare/util-ts-0.11.2...util-ts-0.11.3) (2023-11-06)
|
|
6
10
|
|
|
7
11
|
## [0.11.2](https://github.com/ClipboardHealth/cbh-core/compare/util-ts-0.11.1...util-ts-0.11.2) (2023-11-06)
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export * from "./lib/force-cast";
|
|
|
5
5
|
export * from "./lib/head";
|
|
6
6
|
export * from "./lib/identity";
|
|
7
7
|
export * from "./lib/is-string";
|
|
8
|
-
export * from "./lib/money";
|
|
9
8
|
export * from "./lib/non-empty-array";
|
|
10
9
|
export * from "./lib/null-to-undefined";
|
|
11
10
|
export * from "./lib/stringify";
|
package/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/util-ts/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/util-ts/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
|
package/src/index.js
CHANGED
|
@@ -1,29 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
__exportStar(require("./lib/cbh-
|
|
19
|
-
__exportStar(require("./lib/
|
|
20
|
-
__exportStar(require("./lib/
|
|
21
|
-
__exportStar(require("./lib/
|
|
22
|
-
__exportStar(require("./lib/
|
|
23
|
-
__exportStar(require("./lib/
|
|
24
|
-
__exportStar(require("./lib/
|
|
25
|
-
__exportStar(require("./lib/non-empty-array"), exports);
|
|
26
|
-
__exportStar(require("./lib/null-to-undefined"), exports);
|
|
27
|
-
__exportStar(require("./lib/stringify"), exports);
|
|
28
|
-
__exportStar(require("./lib/to-error"), exports);
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./lib/cbh-error"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./lib/cbh-response"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./lib/defined-utils"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./lib/force-cast"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./lib/head"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./lib/identity"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./lib/is-string"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./lib/non-empty-array"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./lib/null-to-undefined"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./lib/stringify"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./lib/to-error"), exports);
|
|
29
15
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/util-ts/src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/util-ts/src/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC;AAChC,6DAAmC;AACnC,8DAAoC;AACpC,2DAAiC;AACjC,qDAA2B;AAC3B,yDAA+B;AAC/B,0DAAgC;AAChC,gEAAsC;AACtC,kEAAwC;AACxC,0DAAgC;AAChC,yDAA+B"}
|
package/src/lib/money.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare enum CurrencyCode {
|
|
2
|
-
USD = "USD"
|
|
3
|
-
}
|
|
4
|
-
export interface Money {
|
|
5
|
-
amountInMinorUnits: number;
|
|
6
|
-
currencyCode: CurrencyCode;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Money type guard.
|
|
10
|
-
*/
|
|
11
|
-
export declare function isMoney(value: unknown): value is Money;
|
|
12
|
-
//# sourceMappingURL=money.d.ts.map
|
package/src/lib/money.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"money.d.ts","sourceRoot":"","sources":["../../../../../packages/util-ts/src/lib/money.ts"],"names":[],"mappings":"AAEA,oBAAY,YAAY;IACtB,GAAG,QAAQ;CACZ;AAED,MAAM,WAAW,KAAK;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,KAAK,CAUtD"}
|
package/src/lib/money.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isMoney = exports.CurrencyCode = void 0;
|
|
4
|
-
const defined_utils_1 = require("./defined-utils");
|
|
5
|
-
var CurrencyCode;
|
|
6
|
-
(function (CurrencyCode) {
|
|
7
|
-
CurrencyCode["USD"] = "USD";
|
|
8
|
-
})(CurrencyCode || (exports.CurrencyCode = CurrencyCode = {}));
|
|
9
|
-
/**
|
|
10
|
-
* Money type guard.
|
|
11
|
-
*/
|
|
12
|
-
function isMoney(value) {
|
|
13
|
-
if ((0, defined_utils_1.isNullOrUndefined)(value) || typeof value !== "object") {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
const money = value;
|
|
17
|
-
return (typeof money.amountInMinorUnits === "number" &&
|
|
18
|
-
Object.values(CurrencyCode).includes(money.currencyCode));
|
|
19
|
-
}
|
|
20
|
-
exports.isMoney = isMoney;
|
|
21
|
-
//# sourceMappingURL=money.js.map
|
package/src/lib/money.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"money.js","sourceRoot":"","sources":["../../../../../packages/util-ts/src/lib/money.ts"],"names":[],"mappings":";;;AAAA,mDAAoD;AAEpD,IAAY,YAEX;AAFD,WAAY,YAAY;IACtB,2BAAW,CAAA;AACb,CAAC,EAFW,YAAY,4BAAZ,YAAY,QAEvB;AAOD;;GAEG;AACH,SAAgB,OAAO,CAAC,KAAc;IACpC,IAAI,IAAA,iCAAiB,EAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QACzD,OAAO,KAAK,CAAC;KACd;IAED,MAAM,KAAK,GAAG,KAAc,CAAC;IAC7B,OAAO,CACL,OAAO,KAAK,CAAC,kBAAkB,KAAK,QAAQ;QAC5C,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CACzD,CAAC;AACJ,CAAC;AAVD,0BAUC"}
|