Files
Checkmate/node_modules/dom-helpers/esm/isWindow.js
T

6 lines
216 B
JavaScript
Raw Normal View History

2024-05-05 11:21:00 +03:30
import isDocument from './isDocument';
export default function isWindow(node) {
if ('window' in node && node.window === node) return node;
if (isDocument(node)) return node.defaultView || false;
return false;
}