lint: remove unnecessary escape in regex

This commit is contained in:
xenticore
2025-04-28 23:16:34 -04:00
parent f6499adc4a
commit 96f4dbd883

View File

@@ -1,7 +1,7 @@
import { $T } from './localization' import { $T } from './localization'
function toFixed(num: number, fixed: number) { function toFixed(num: number, fixed: number) {
const re = new RegExp('^-?\\d+(?:\.\\d{0,' + (fixed || -1) + '})?'); const re = new RegExp('^-?\\d+(?:.\\d{0,' + (fixed || -1) + '})?');
return num.toString().match(re)[0]; return num.toString().match(re)[0];
} }