Fix Snyk errors
This commit is contained in:
@@ -56,7 +56,7 @@ export class SMDate {
|
||||
}
|
||||
} else if (
|
||||
dateOrString instanceof Date &&
|
||||
!isNaN(dateOrString.getTime())
|
||||
!Number.isNaN(dateOrString.getTime())
|
||||
) {
|
||||
this.date = dateOrString;
|
||||
}
|
||||
@@ -223,7 +223,7 @@ export class SMDate {
|
||||
}
|
||||
|
||||
if (
|
||||
isNaN(date.getTime()) == false &&
|
||||
Number.isNaN(date.getTime()) == false &&
|
||||
checkYear == parsedYear &&
|
||||
checkMonth == parsedMonth &&
|
||||
checkDay == parsedDay &&
|
||||
|
||||
@@ -57,7 +57,7 @@ export const isUUID = (uuid: string): boolean => {
|
||||
* @returns {string} The bytes in human readable string.
|
||||
*/
|
||||
export const bytesReadable = (bytes: number): string => {
|
||||
if (isNaN(bytes)) {
|
||||
if (Number.isNaN(bytes)) {
|
||||
return "0 Bytes";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user