mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-20 16:43:53 +01:00
Start of auto updates
This commit is contained in:
7
src-web/lib/formatters.ts
Normal file
7
src-web/lib/formatters.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export function tryFormatJson(text: string): string {
|
||||
try {
|
||||
return JSON.stringify(JSON.parse(text), null, 2);
|
||||
} catch (_) {
|
||||
return text;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user