@carlosdiazz/lottodiz-shared 1.4.0 → 1.4.2
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/test/example.js
CHANGED
|
@@ -5,8 +5,6 @@ const main = async () => {
|
|
|
5
5
|
//const date = new Date("2025-10-22");
|
|
6
6
|
//validateDate(date, ["test"]);
|
|
7
7
|
//console.log(date);
|
|
8
|
-
|
|
9
|
-
throw new Error("OO");
|
|
10
|
-
}, 5, 1);
|
|
8
|
+
console.log((0, utils_1.getDelayFromTime)("19:00:45"));
|
|
11
9
|
};
|
|
12
10
|
main();
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.getDelayFromTime = void 0;
|
|
7
7
|
const dayjs_1 = __importDefault(require("dayjs"));
|
|
8
8
|
const getDelayFromTime = (time) => {
|
|
9
|
-
const timeRegex = /^([01]\d|2[0-3]):([0-5]\d)
|
|
9
|
+
const timeRegex = /^([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d))?$/;
|
|
10
10
|
if (!timeRegex.test(time)) {
|
|
11
|
-
throw new Error(`Invalid time: "${time}". Must be in HH:mm format (00:00–23:59).`);
|
|
11
|
+
throw new Error(`Invalid time: "${time}". Must be in HH:mm or HH:mm:ss format (00:00:00–23:59:59).`);
|
|
12
12
|
}
|
|
13
13
|
const now = (0, dayjs_1.default)();
|
|
14
14
|
const target = (0, dayjs_1.default)(`${now.format("YYYY-MM-DD")} ${time}`);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DrawWebscrapingInterface } from "../models";
|
|
2
|
-
export declare const validatePageWebscraping: (draw_webscraping: DrawWebscrapingInterface) =>
|
|
1
|
+
import { DrawWebscrapingInterface, PageWebscrapingInterface } from "../models";
|
|
2
|
+
export declare const validatePageWebscraping: (draw_webscraping: DrawWebscrapingInterface) => PageWebscrapingInterface[];
|