'use strict'
var isObject = require('is-object')
var isWindow = require('is-window')

function isNode (val) {
  return !isObject(val)
    ? false
    : (!isWindow(window) || typeof window.Node !== 'function')
      ? false
      : (typeof val.nodeType === 'number') &&
        (typeof val.nodeName === 'string')
}

module.exports = isNode

var isObject = require('is-object')
var isWindow = require('is-window')

function isNode (val) {
  if (!isObject(val) || !isWindow(window) || typeof window.Node !== 'function') {
    return false
  }

  return typeof val.nodeType === 'number' &&
    typeof val.nodeName === 'string'
}

module.exports = isNode

Simplify logic by removing nested ternaries
Simplify logic by removing nested ternaries

Also dropped the use strict line
