_.isElement(value)

sourcenpm package

Checks if value is likely a DOM element.

Since

0.1.0

Arguments

  • value (*): The value to check.

Returns

(boolean): Returns true if value is a DOM element, else false.

Example

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