}
}
- static convertToDate(value): Date {
+ static convertToDate(value: any): Date {
// Check
if (!value) {
return value;
return value;
}
- static convertToInt(value): number {
+ static convertToInt(value: any): number {
let changedValue = value;
if (!value) {
return 0;
return changedValue;
}
- static convertToFloat(value): number {
+ static convertToFloat(value: any): number {
let changedValue = value;
if (!value) {
return 0;
return changedValue;
}
- static convertToBoolean(value): boolean {
+ static convertToBoolean(value: any): boolean {
let result = false;
// Check boolean
if (value) {
}
static logPrefix(prefixString = ''): string {
- const date = new Date();
- return date.toLocaleString() + prefixString;
+ return new Date().toLocaleString() + prefixString;
}
static cloneObject<T>(object: T): T {
return false;
}
- static isEmptyJSon(document): boolean {
+ static isEmptyJSon(document: any): boolean {
// Empty?
if (!document) {
return true;
return Object.keys(document).length === 0;
}
- static isString(value): boolean {
+ static isString(value: any): boolean {
return typeof value === 'string';
}
- static isUndefined(value): boolean {
+ static isUndefined(value: any): boolean {
return typeof value === 'undefined';
}
- static isNullOrUndefined(value): boolean {
+ static isNullOrUndefined(value: any): boolean {
// eslint-disable-next-line no-eq-null, eqeqeq
if (value == null) {
return true;
return false;
}
- static isEmptyArray(object): boolean {
+ static isEmptyArray(object: any): boolean {
if (!object) {
return true;
}
return true;
}
- static isEmptyObject(obj): boolean {
+ static isEmptyObject(obj: any): boolean {
return !Object.keys(obj).length;
}