Allowing query(''), testing and documenting

There you go with calling empty strings in query. I started to cover some documentation with JSDoc, as discussed with Étienne.