util: refactor util module
Refactor util module
- Use module.exports pattern (but preserve
exports =
also so monkeypatching still works) - Early capture of prototype methods
- More consistent use of template strings and
...args
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
util