Skip to content
This repository has been archived by the owner on Aug 12, 2021. It is now read-only.

mishamyrt/noquery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

noQuery Quality assurance

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))

About

💰Teenie-weenie jQuery–like function for queries

Topics

Resources

License

Stars

Watchers

Forks