@carlosdiazz/lottodiz-shared 1.9.0 → 1.9.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.
|
@@ -7,6 +7,10 @@ export interface ParamsDrawWebscrapingInterface extends PaginationInterface {
|
|
|
7
7
|
is_init?: boolean | null;
|
|
8
8
|
is_error?: boolean | null;
|
|
9
9
|
is_running?: boolean | null;
|
|
10
|
+
id_platform?: number | null;
|
|
11
|
+
id_country?: number | null;
|
|
12
|
+
id_lottery?: number | null;
|
|
13
|
+
id_template_draw?: number | null;
|
|
10
14
|
}
|
|
11
15
|
export interface ParamsDrawWebscrapingByDateInterface {
|
|
12
16
|
date: Date;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from "./exect-function";
|
|
|
6
6
|
export * from "./get-day-number-of-day";
|
|
7
7
|
export * from "./get-delay-from-time";
|
|
8
8
|
export * from "./mapper-api-result-v2";
|
|
9
|
+
export * from "./normalize-time";
|
|
9
10
|
export * from "./sleep";
|
|
10
11
|
export * from "./validate-arrays-equal";
|
|
11
12
|
export * from "./validate-day";
|
package/dist/utils/index.js
CHANGED
|
@@ -22,6 +22,7 @@ __exportStar(require("./exect-function"), exports);
|
|
|
22
22
|
__exportStar(require("./get-day-number-of-day"), exports);
|
|
23
23
|
__exportStar(require("./get-delay-from-time"), exports);
|
|
24
24
|
__exportStar(require("./mapper-api-result-v2"), exports);
|
|
25
|
+
__exportStar(require("./normalize-time"), exports);
|
|
25
26
|
__exportStar(require("./sleep"), exports);
|
|
26
27
|
__exportStar(require("./validate-arrays-equal"), exports);
|
|
27
28
|
__exportStar(require("./validate-day"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const normalizeTime: (time: string) => string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeTime = void 0;
|
|
4
|
+
const normalizeTime = (time) => {
|
|
5
|
+
// Elimina espacios y valida formato básico
|
|
6
|
+
const clean = time.trim();
|
|
7
|
+
// Si ya tiene segundos, la dejamos igual
|
|
8
|
+
if (/^\d{1,2}:\d{2}:\d{2}$/.test(clean)) {
|
|
9
|
+
return clean;
|
|
10
|
+
}
|
|
11
|
+
// Si solo tiene horas y minutos, agregamos :00
|
|
12
|
+
if (/^\d{1,2}:\d{2}$/.test(clean)) {
|
|
13
|
+
return `${clean}:00`;
|
|
14
|
+
}
|
|
15
|
+
throw new Error(`normalizeTime - Formart Invalid => ${time}`);
|
|
16
|
+
};
|
|
17
|
+
exports.normalizeTime = normalizeTime;
|