dqs = document.querySelector.bind(document);
dqsA = document.querySelectorAll.bind(document);
So instead of country = document.querySelector('#country');
cities = document.querySelectorAll('.city');
I can write country = dqs('#country');
cities = dqsA('.city');
For everything else, I am fine with just using the native browser functions.I usually import the two functions from a module like this:
import { dqs, dqsA } from '/lib/js/dqs.js';
This is the module: