mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-17 21:18:26 +03:00
feat: change dns check output
This commit is contained in:
@@ -11,3 +11,4 @@ export * from './splitProxyString';
|
||||
export * from './preserveScrollForPage';
|
||||
export * from './parseQueryString';
|
||||
export * from './svgEl';
|
||||
export * from './insertIf';
|
||||
|
||||
7
fe-app-podkop/src/helpers/insertIf.ts
Normal file
7
fe-app-podkop/src/helpers/insertIf.ts
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user