nested-child

Find the most nested element

Usage no npm install needed!

<script type="module">
  import nestedChild from 'https://cdn.skypack.dev/nested-child';
</script>

README

nested-child

NPM version NPM downloads NPM license All Contributors Codecov Travis Bundle size

About ℹī¸

Find the most nested element

How to Install 💾

First, install the library in your project by npm:

$ npm install nested-child

Or Yarn:

$ yarn add nested-child

Getting Started 🏁

Connect libary to project:

import { nestedChild } from 'nested-child';

Next use library:

nestedChild(document.getElementById('wrapper'));

Example

<div id="container">
  <div>
    <div>
      <p>Hello World!</p>
    </div>
  </div>
</div>
const {} = nestedChild(document.getElementById('container'));

console.log(child.innerHTML); // Hello World!

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Jakub Biesiada

đŸ’ģ ⚠ī¸ 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

License 🔱

This project is licensed under the MIT License Š 2020-present Jakub Biesiada