The code like in query_params is not typical code in the real projects. Such functions can be gathered in under utils package/module, unit-tested, and probably most of those can be obtained from well-tested libraries.
For the cleanness of the code it's much more important that such kinds of functions never appear in the problem domain modules. (in case of query_params it is in the right place only if one writes a web-framework, which is very rare case)
But thank you for the article. While reading your article about Python, which is my preferred PL as well, I've understood now what I dislike in JavaScript. Namely, JS developers "inline" things like your example of query_params way too much, obscuring the problem domain logic. Of course, nothing prevents to write JS differently (the language syntax itself is only slightly noisier), but in my experience the culture is different.