isWindow.js 251 B

12345678910111213
  1. var staticWindow = require('./staticWindow')
  2. /**
  3. * 判断是否Window对象
  4. *
  5. * @param {Object} obj 对象
  6. * @return {Boolean}
  7. */
  8. function isWindow (obj) {
  9. return staticWindow && !!(obj && obj === obj.window)
  10. }
  11. module.exports = isWindow