refactor(minErr): better minification and other improvements

Removes a "magic number" (2) used multiple times in the code.
Removes unnecessary variables "arg" and "prefix".
Removed a condition within the "for" loop that generates query string parameters.
Adds a test case to ensure URL parameters are generated as expected.