Comparing version 0.0.6 to 0.0.7
@@ -19,2 +19,4 @@ import { Delta } from '../index'; | ||
nvl2(value: any, a: any, b: any): any; | ||
tryParse(value: string): any | null; | ||
sleep(ms?: number): Promise<void>; | ||
clone(obj: any): any; | ||
@@ -48,2 +50,4 @@ extends(obj: any, base: any): any; | ||
isTimeFormat(value: any): boolean; | ||
between(value: any, from: any, to: any): boolean; | ||
includes(list: any[] | string, value: any): boolean; | ||
existsPath(sourcePath: string): Promise<boolean>; | ||
@@ -60,5 +64,4 @@ createIfNotExists(sourcePath: string): Promise<void>; | ||
solveEnvironmentVariables(source: any): void; | ||
tryParse(value: string): any | null; | ||
isPositiveInteger(value: any): boolean; | ||
deltaWithSimpleArrays(current: any, old?: any): Delta; | ||
} |
@@ -58,2 +58,10 @@ "use strict"; | ||
} | ||
tryParse(value) { | ||
return this.helper.tryParse(value); | ||
} | ||
sleep(ms = 1000) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return this.helper.sleep(ms); | ||
}); | ||
} | ||
clone(obj) { | ||
@@ -143,2 +151,8 @@ return this.obj.clone(obj); | ||
} | ||
between(value, from, to) { | ||
return this.validator.between(value, from, to); | ||
} | ||
includes(list, value) { | ||
return this.validator.includes(list, value); | ||
} | ||
existsPath(sourcePath) { | ||
@@ -193,5 +207,2 @@ return __awaiter(this, void 0, void 0, function* () { | ||
} | ||
tryParse(value) { | ||
return this.helper.tryParse(value); | ||
} | ||
isPositiveInteger(value) { | ||
@@ -198,0 +209,0 @@ return this.validator.isPositiveInteger(value); |
@@ -25,2 +25,4 @@ export declare class Validator { | ||
isTimeFormat(value: any): boolean; | ||
between(value: any, from: any, to: any): boolean; | ||
includes(list: any[] | string, value: any): boolean; | ||
} |
@@ -100,4 +100,15 @@ "use strict"; | ||
} | ||
between(value, from, to) { | ||
return value >= from && value < to; | ||
} | ||
includes(list, value) { | ||
if (list && value) { | ||
return list.includes(value); | ||
} | ||
else { | ||
return false; | ||
} | ||
} | ||
} | ||
exports.Validator = Validator; | ||
//# sourceMappingURL=validator.js.map |
{ | ||
"name": "h3lp", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Helper for nodeJs", | ||
@@ -5,0 +5,0 @@ "author": "Flavio Lionel Rita <flaviolrita@hotmail.com>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
74109
1045
3