Fix all ESLint errors
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-03-28 12:25:04 +01:00
parent 3bf8859ff9
commit f5202f596d
21 changed files with 74 additions and 44 deletions

View File

@ -2,8 +2,9 @@
* Generate a random MAC address
*/
export function randomMacAddress(prefix: string | undefined): string {
prefix = prefix ?? "";
let mac = "XX:XX:XX:XX:XX:XX";
mac = prefix + mac.slice(prefix?.length);
mac = prefix + mac.slice(prefix.length);
return mac.replace(/X/g, () =>
"0123456789abcdef".charAt(Math.floor(Math.random() * 16))