katoikia-app/web-ui/web-react/node_modules/dom-helpers/cjs/isWindow.js

16 lines
440 B
JavaScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = isWindow;
var _isDocument = _interopRequireDefault(require("./isDocument"));
function isWindow(node) {
if ('window' in node && node.window === node) return node;
if ((0, _isDocument.default)(node)) return node.defaultView || false;
return false;
}
module.exports = exports["default"];