URL Parameters into Javascript Mappers

I created a Javascript Mapper and want to manipulate the query parameters of the incoming resource url or put a query parameter into a token.
Is there a way of doing that?