iselement

1.1.4 • Public • Published

isElement

Utility function that returns true if referenced object is DOM element.

Most similar functions just checks, if object is instance of HTMLElement. That does not always work, because it exotic elements like SVG polygons.

How to use

import isElement from 'iselement';

isElement(my_object);  // --> true/false

Documentation

isElement

Returns true if provided input is Element.

Parameters

  • input [Any]

Returns boolean

Readme

Keywords

none

Package Sidebar

Install

npm i iselement

Weekly Downloads

58,500

Version

1.1.4

License

MIT

Last publish

Collaborators

  • fczbkk