If that is literally the only wrapper you need, sure go ahead.
But most of the time, you find you need another wrapper, and then another, and the next thing you know you have most of jQuery, just not as uniform or as well tested.
I've seen this with database ORMs also.
Re:Gov.uk drops jQuery from their front end
by tiborsaas on Thursday May 19, 2022 @11:18AM
(#31435833)
Then compare it with dog's and pick the simpler one :) I don't know what's wrong with a utils.js file that only has what you need in a way that fits your project exactly. Woof.
your dog will not look for a simpler impl before making one.
your npm's dependencies authors cat will write a small wrapper and wont know about yours.
Re:Gov.uk drops jQuery from their front end
by DeathArrow on Thursday May 19, 2022 @02:41PM
(#31438448)
But writing that utils.js will end up rewriting jQuery.
Re:Gov.uk drops jQuery from their front end
by tiborsaas on Thursday May 19, 2022 @06:00PM
(#31440704)
I've seen this argument a lot, but based on my experience it will take ~5 small functions to get what I need and how I need.
It's even easier if you copy paste from here: https://anguscroll.com/just/
It takes only 1 minute to write a wrapper, so you will write one, and I'll write one, and your dog will write one.