Fetch (a stand-alone CSS querying engine)

I've started work on a new side-project called Fetch. It's a stand-alone CSS querying engine, designed to be super lightweight and offer high performance across all modern browsers.

It's still very much in development and the source is a bit sloppy, but it currently weighs in at only 2.5k compressed and gzipped and (in Firefox3) either outperforms or is on par with all other major Javascript libraries out there*.

It's definitely not ready for production use, but when it is, it will become the new CSS querying engine for Gimme and will also be available as a stand-alone library, which will be extensible (so you can add your own rules) and which will also be guaranteed to play nicely with other libraries by not adding to the prototype of any native objects and only introducing one single global variable (fetch).

For anyone interested, the current (i.e. sloppy) source is available on CodePlex: fetch.js.

As I said, it's not ready for prime time and the code is sloppy (and probably buggy). Consider yourself warned.

* Fetch was not compared with libraries that use XPath or querySelectorAll, because it uses neither, but rather is a pure Javascript implementation. Upon release, it will take advantage of querySelectorAll where appropriate, but will not use XPath.

2 Responses

  1. Anthony Alexander Says:

    Pretty cool, my api can use any 3rd party querying engines but I've only been able to test it with peppy so far. I was hoping I could test it on John Resig's Sizzle, but that bastard is a little capitalist. Thanks for providing it, I'll try to return some useful feedback, although I stayed away from querying engines for a reason.

  2. Stephen Stchur Says:

    @Anthony:
    Definitely let me know if it suites your needs; I'd be very interested to get some feedback.

    It has been updated since I wrote that post. Latest code available here: http://gimme.codeplex.com/SourceControl/changeset/view/33751#412111

    The file, "fetch.js" is all you need, but you're more than welcome to experiment w/ the whole library (which uses Fetch).

    Thanks!

Got something to say?

Please note: Constructive criticism is welcome. Rude or vulgar comments however, are not and will be removed during moderation.