Commit e9e5e14a authored by LAVENIER's avatar LAVENIER
Browse files

[fix] Samples: fix unit conversion (add UnitConversion class) - fix issue IMAGINE-560

parent dd87d1c2
......@@ -15,6 +15,9 @@ export function isNotNilOrBlank<T>(obj: T | null | undefined): boolean {
export function isNotNilOrNaN<T>(obj: T | null | undefined): boolean {
return obj !== undefined && obj !== null && (typeof obj !== 'number' || !isNaN(obj));
}
export function isNilOrNaN<T>(obj: T | null | undefined): boolean {
return obj === undefined || obj === null || (typeof obj === 'number' && isNaN(obj));
}
export function isNotEmptyArray<T>(obj: T[] | null | undefined): boolean {
return obj !== undefined && obj !== null && obj.length > 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment