@zhongqian97-code/ecode 0.5.11 → 0.5.13
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.js +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2458,6 +2458,7 @@ function parseInterval(input) {
|
|
|
2458
2458
|
const ms = parseInt(normalized, 10) * 1e3;
|
|
2459
2459
|
return ms > 0 && ms >= MIN_INTERVAL_MS ? { intervalMs: ms } : null;
|
|
2460
2460
|
}
|
|
2461
|
+
if (!/^(\d+\s*[smh])+$/i.test(normalized)) return null;
|
|
2461
2462
|
let totalMs = 0;
|
|
2462
2463
|
let matchCount = 0;
|
|
2463
2464
|
TIME_TOKEN_RE.lastIndex = 0;
|