Just make $ alias for document.querySelector.
npm i usd-query
import $ from 'usd-query'
$('.foo') // document.querySelector('.foo')
import { $$ } from 'usd-query'
$$('.foo') // document.querySelectorAll('.foo')
See .github/CONTRIBUTING.md
, then .github/DEVELOPMENT.md
.
Thanks! 💖
Josh Goldberg 🔧 |
Ryota Murakami 💻 🖋 📖 🤔 🚇 🚧 📆 🔧 |
💙 This package is based on @JoshuaKGoldberg's template-typescript-node-package.