This commit is contained in:
SPRINX0\prochazka
2024-11-12 17:38:18 +01:00
parent 59aa2e3f33
commit c6dab85fc2
3 changed files with 14 additions and 5 deletions

View File

@@ -312,6 +312,14 @@ export function safeJsonParse(json, defaultValue?, logError = false) {
}
}
export function safeCompileRegExp(regex: string, flags: string) {
try {
return new RegExp(regex, flags);
} catch (err) {
return null;
}
}
export function shouldOpenMultilineDialog(value) {
if (_isString(value)) {
if (value.includes('\n')) {