is-in-dom

1.0.1 • Public • Published

is-in-dom

Test if elements from object exist in DOM.

If element is not found in DOM, message with element name will by shown in devTools console.

example of usage

npm i is-in-dom
import Test from 'is-in-dom'

var elements = {
  // list of elements to test
  btn: $('.btn'),
  head: document.querySelector('.head'),
  menuItems: document.querySelectorAll('.menu-item'),
  // insert lib here
  test: Test.elements
}

elements.test()

Package Sidebar

Install

npm i is-in-dom

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

1.45 kB

Total Files

3

Last publish

Collaborators

  • undg