12 lines
381 B
JavaScript
12 lines
381 B
JavaScript
|
/**
|
||
|
* Verifies if an application can use DOM.
|
||
|
*/
|
||
|
export function canUseDOM() {
|
||
|
return (
|
||
|
// eslint-disable-next-line no-restricted-globals
|
||
|
typeof window !== 'undefined' &&
|
||
|
!!(
|
||
|
// eslint-disable-next-line no-restricted-globals, deprecation/deprecation
|
||
|
(window.document && window.document.createElement)));
|
||
|
}
|
||
|
//# sourceMappingURL=canUseDOM.js.map
|