noQuery
A function for elements selection in 71 ASCII chars.
import { $ } from 'mishamyrt-noquery'
const title = $('h1')
If only one element is found, the function will return it. Otherwise, it will return an array with all native methods.
const handleClick = () => alert('Whoops')
const isRed = n => n.classList.contains('__red')
// Set click callback to all red buttons
$('.button')
.filter(isRed)
.forEach(n => n.addEventListener('click', handleClick))