Nasty Popsicle Machine

    mishamyrt-noquery
    TypeScript icon, indicating that this package has built-in type declarations

    3.0.0 • Public • Published

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

    Install

    npm i mishamyrt-noquery

    DownloadsWeekly Downloads

    13

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    7.32 kB

    Total Files

    12

    Last publish

    Collaborators

    • mishamyrt