Use literal regexes instead of run-time compile from arrays
Use literal regexes instead of run-time compile from arrays

Also simplify the optional 'nav' parameter check and cache check,
because for it these values to be valid, they have to be an object,
which is always thruthy.

wikimedia/jquery-client