UI for Zipcoin Blue

1234567891011121314151617181920212223242526
  1. var isObjectLike = require('./isObjectLike'),
  2. isPlainObject = require('./isPlainObject');
  3. /**
  4. * Checks if `value` is likely a DOM element.
  5. *
  6. * @static
  7. * @memberOf _
  8. * @since 0.1.0
  9. * @category Lang
  10. * @param {*} value The value to check.
  11. * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
  12. * @example
  13. *
  14. * _.isElement(document.body);
  15. * // => true
  16. *
  17. * _.isElement('<body>');
  18. * // => false
  19. */
  20. function isElement(value) {
  21. return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
  22. }
  23. module.exports = isElement;