added format command and added trailing commas to reduce conflicts

This commit is contained in:
dswbx
2025-02-26 20:06:03 +01:00
parent 88b5359f1c
commit 7743f71a11
414 changed files with 3622 additions and 3610 deletions

View File

@@ -2,17 +2,17 @@ type ConsoleSeverity = "log" | "warn" | "error";
const _oldConsoles = {
log: console.log,
warn: console.warn,
error: console.error
error: console.error,
};
export async function withDisabledConsole<R>(
fn: () => Promise<R>,
severities: ConsoleSeverity[] = ["log", "warn", "error"]
severities: ConsoleSeverity[] = ["log", "warn", "error"],
): Promise<R> {
const _oldConsoles = {
log: console.log,
warn: console.warn,
error: console.error
error: console.error,
};
disableConsoleLog(severities);
const enable = () => {
@@ -57,6 +57,6 @@ export function formatMemoryUsage() {
rss: usage.rss / 1024 / 1024,
heapUsed: usage.heapUsed / 1024 / 1024,
external: usage.external / 1024 / 1024,
arrayBuffers: usage.arrayBuffers / 1024 / 1024
arrayBuffers: usage.arrayBuffers / 1024 / 1024,
};
}