A chainable API for constructing RegExps, written in Javascript