DEV Community 👩‍💻👨‍💻

DEV Community 👩‍💻👨‍💻 is a community of 966,904 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Ed Link III
Ed Link III

Posted on

My First Release: JS Query

I started tinkering with the concept of replacing jQuery a while back, and I've finally finished it. Not really, I just started making major changes to it and decided I should put out a 1.0 release of it in it's current state. (Luckily, GitHub makes that pretty easy.)

Honestly, it all started with me not wanting to change el.hasClass() to el.classList.contains()!

The most important thing to me in writing this was to make sure it was completely compatible with Vanilla JavaScript:
$q('#my_id').textContext('Hello World')

The second most important thing was to make as many of the calls as possible (and made sense to be) chainable:

It is being used in production in one of my current employer's applications. However, I write code for a controlled environment - this library is not exactly IE safe. Personally, I've never tested it to see what all would break (if someone would like to do that and update the docs, cool!), but it is pretty dependent on modern browsers and their ability to use modern JavaScript.

I hope you enjoy playing with it as much as I enjoyed writing it.

So, here it is, for your consideration: JS Query v1.0

Top comments (0)


"I made 10x faster JSON.stringify() functions, even type safe"

☝️ Must read for JS devs