Node is ancestor of
Check if node is ancestor of descendant
Install
- NPMnpm install --save node-is-ancestor-of
- Yarnyarn add node-is-ancestor-of
Usage
const isAncestorOf = const el1 = documentconst el2 = documentconsole// return true if el1 is ancestor of el2// return false if el1 is not ancestor of el2
License
MIT © Roman Masyhar