@dnax/core 0.0.3 → 0.0.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/package.json +2 -1
- package/utils/index.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dnax/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"module": "index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"devDependencies": {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"consola": "^3.2.3",
|
|
20
20
|
"cookie": "^0.6.0",
|
|
21
21
|
"croner": "^8.0.2",
|
|
22
|
+
"dayjs": "^1.11.11",
|
|
22
23
|
"find-open-port": "^2.0.3",
|
|
23
24
|
"generate-unique-id": "^2.0.3",
|
|
24
25
|
"hono": "^4.4.3",
|
package/utils/index.ts
CHANGED
|
@@ -6,7 +6,7 @@ import path from "path";
|
|
|
6
6
|
import { parse, format } from "@lukeed/ms";
|
|
7
7
|
import jwto from "jsonwebtoken";
|
|
8
8
|
import generateUniqueId from "generate-unique-id";
|
|
9
|
-
|
|
9
|
+
import dayjs from "dayjs";
|
|
10
10
|
const JWT_SECRET = process?.env?.JWT_SECRET || "secret-libv";
|
|
11
11
|
import * as _ from "radash";
|
|
12
12
|
|
|
@@ -75,7 +75,7 @@ function isDate(date: string): boolean {
|
|
|
75
75
|
let isDate_ = !isNaN(Date.parse(date)) && dateRegex.test(date);
|
|
76
76
|
if (isDate_) return true;
|
|
77
77
|
try {
|
|
78
|
-
isDate_ =
|
|
78
|
+
isDate_ = dayjs(date).isValid();
|
|
79
79
|
} catch (err) {}
|
|
80
80
|
return isDate_;
|
|
81
81
|
}
|