@blivesta/util-selectors
Install
yarn add @blivesta/util-selectors
Usage
<div class="foo">
<div class="bar">1</div>
<div class="bar">2</div>
</div>
import { $$, $$$ } from '@blivesta/util-selectors'
$$$('.bar').length // 2
$$$('.bar', $$('#foo')).forEach((node, i) => {
node.getAttribute('class') // 'bar'
})
License
Released under the MIT license.