extendable selector engine written in javascript