0.0.4 • Published 5 years ago

qutility v0.0.4

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

qutility

Minimalistic DOM query utility.

Installation

yarn add qutility

Usage

Basically forwards elements, collections, or collections from selector strings (+ optional context) to Array.from(). Like this or something:

import q from 'qutility'

const metaContent = q('meta', document.head, el => el.content).join('\n')

q('section')
  .flatMap(el => q('.meta-content', el))
  .forEach(el => {
    el.textContent = metaContent
  })

Please have a look at the specs for details.

Todo

  • Accept a context argument for elements and collections as well
  • Accept a selector string as the context argument

License

MIT 2018

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago