@cryptexlabs/codex-nodejs-common 0.14.2 → 0.14.4
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/lib/package.json +1 -1
- package/lib/src/pipe/index.d.ts +1 -0
- package/lib/src/pipe/index.js +1 -0
- package/lib/src/pipe/index.js.map +1 -1
- package/lib/src/util/date.util.js +3 -3
- package/lib/src/util/date.util.js.map +1 -1
- package/package.json +1 -1
- package/src/pipe/index.ts +1 -0
- package/src/util/date.util.ts +1 -1
package/lib/package.json
CHANGED
package/lib/src/pipe/index.d.ts
CHANGED
package/lib/src/pipe/index.js
CHANGED
|
@@ -23,4 +23,5 @@ __exportStar(require("./uuidv4.array.validation.pipe"), exports);
|
|
|
23
23
|
__exportStar(require("./uuidv4.validation.pipe"), exports);
|
|
24
24
|
__exportStar(require("./integer.validation.pipe"), exports);
|
|
25
25
|
__exportStar(require("./float.validation.pipe"), exports);
|
|
26
|
+
__exportStar(require("./custom.parse-bool.pipe"), exports);
|
|
26
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pipe/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,6CAA2B;AAC3B,uDAAqC;AACrC,mDAAiC;AACjC,6DAA2C;AAC3C,iEAA+C;AAC/C,2DAAyC;AACzC,4DAA0C;AAC1C,0DAAwC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pipe/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,6CAA2B;AAC3B,uDAAqC;AACrC,mDAAiC;AACjC,6DAA2C;AAC3C,iEAA+C;AAC/C,2DAAyC;AACzC,4DAA0C;AAC1C,0DAAwC;AACxC,2DAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DateUtil = void 0;
|
|
4
|
-
const
|
|
4
|
+
const moment = require("moment");
|
|
5
5
|
class DateUtil {
|
|
6
6
|
static isValidISO8601Date(dateString) {
|
|
7
7
|
const regex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(.\d+)?(Z|[+-]\d{2}:\d{2})$/;
|
|
@@ -11,13 +11,13 @@ class DateUtil {
|
|
|
11
11
|
if (!date) {
|
|
12
12
|
return date;
|
|
13
13
|
}
|
|
14
|
-
return ((
|
|
14
|
+
return (moment(date, "YYYY-MM-DD HH:mm:ss").toISOString(true).slice(0, 23) + "Z");
|
|
15
15
|
}
|
|
16
16
|
static toMysqlString(date) {
|
|
17
17
|
if (!date) {
|
|
18
18
|
return date;
|
|
19
19
|
}
|
|
20
|
-
return (
|
|
20
|
+
return moment(date, "YYYY-MM-DDThh:mm:ssZ")
|
|
21
21
|
.utcOffset(0)
|
|
22
22
|
.format("YYYY-MM-DD HH:mm:ss");
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.util.js","sourceRoot":"","sources":["../../../src/util/date.util.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"date.util.js","sourceRoot":"","sources":["../../../src/util/date.util.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AAEjC,MAAa,QAAQ;IACZ,MAAM,CAAC,kBAAkB,CAAC,UAAkB;QACjD,MAAM,KAAK,GAAG,iEAAiE,CAAC;QAChF,OAAO,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAChC,CAAC;IAED,MAAM,CAAC,0BAA0B,CAAC,IAAmB;QACnD,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,IAAW,CAAC;QACrB,CAAC;QACD,OAAO,CACL,MAAM,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CACzE,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,aAAa,CAAC,IAAmB;QACtC,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,IAAW,CAAC;QACrB,CAAC;QACD,OAAO,MAAM,CAAC,IAAI,EAAE,sBAAsB,CAAC;aACxC,SAAS,CAAC,CAAC,CAAC;aACZ,MAAM,CAAC,qBAAqB,CAAC,CAAC;IACnC,CAAC;CACF;AAvBD,4BAuBC"}
|
package/package.json
CHANGED
package/src/pipe/index.ts
CHANGED
package/src/util/date.util.ts
CHANGED