feat: change dns check output

This commit is contained in:
divocat
2025-10-13 21:49:38 +03:00
parent 0fba31c10a
commit aea6fd9453
5 changed files with 51 additions and 19 deletions

View File

@@ -11,3 +11,4 @@ export * from './splitProxyString';
export * from './preserveScrollForPage';
export * from './parseQueryString';
export * from './svgEl';
export * from './insertIf';

View File

@@ -0,0 +1,7 @@
export function insertIf<T>(condition: boolean, elements: Array<T>) {
return condition ? elements : ([] as Array<T>);
}
export function insertIfObj<T>(condition: boolean, object: T) {
return condition ? object : ({} as T);
}