isElement source npm

_.isElement(value)

Checks if value is likely a DOM element.

Arguments

  1. value (*)

    The value to check.

Returns (boolean)

Returns true if value is a DOM element, else false.

Example

_.isElement(document.body);
// => true

_.isElement('<body>');
// => false