ts-fsrs 5.2.2 → 5.2.3
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/dist/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +4 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -54,8 +54,9 @@ class TypeConvert {
|
|
|
54
54
|
throw new Error(`Invalid state:[${value}]`);
|
|
55
55
|
}
|
|
56
56
|
static time(value) {
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
const date = new Date(value);
|
|
58
|
+
if (typeof value === "object" && value !== null && !Number.isNaN(Date.parse(value) || +date)) {
|
|
59
|
+
return date;
|
|
59
60
|
} else if (typeof value === "string") {
|
|
60
61
|
const timestamp = Date.parse(value);
|
|
61
62
|
if (!Number.isNaN(timestamp)) {
|
|
@@ -468,7 +469,7 @@ function alea(seed) {
|
|
|
468
469
|
return prng;
|
|
469
470
|
}
|
|
470
471
|
|
|
471
|
-
const version="5.2.
|
|
472
|
+
const version="5.2.3";
|
|
472
473
|
|
|
473
474
|
const default_request_retention = 0.9;
|
|
474
475
|
const default_maximum_interval = 36500;
|