8 lines
375 B
JavaScript
8 lines
375 B
JavaScript
'use client';
|
|
/**
|
|
* Verifies if an application can use DOM.
|
|
*/ export function canUseDOM() {
|
|
return /* eslint-disable @nx/workspace-no-restricted-globals -- expected ignore ( SSR friendly acquisition of globals )*/ typeof window !== 'undefined' && !!(window.document && // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
window.document.createElement);
|
|
}
|