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.umd.js
CHANGED
|
@@ -76,8 +76,9 @@
|
|
|
76
76
|
throw new Error(`Invalid state:[${value}]`);
|
|
77
77
|
}
|
|
78
78
|
static time(value) {
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
const date = new Date(value);
|
|
80
|
+
if (typeof value === "object" && value !== null && !Number.isNaN(Date.parse(value) || +date)) {
|
|
81
|
+
return date;
|
|
81
82
|
} else if (typeof value === "string") {
|
|
82
83
|
const timestamp = Date.parse(value);
|
|
83
84
|
if (!Number.isNaN(timestamp)) {
|
|
@@ -496,7 +497,7 @@
|
|
|
496
497
|
return prng;
|
|
497
498
|
}
|
|
498
499
|
|
|
499
|
-
const version="5.2.
|
|
500
|
+
const version="5.2.3";
|
|
500
501
|
|
|
501
502
|
const default_request_retention = 0.9;
|
|
502
503
|
const default_maximum_interval = 36500;
|