Last modified: 2013-11-19 10:44:37 UTC
mediawiki.inspect.js has a function humanSize, mediawiki.special.upload.js a function prettySize, UW probably has such a function, and there will be several other implementations of it, including user scripts and gadgets. Instead of re-inventing the wheel every time there should be a module for this, or a function in an already existing module.
We have mediawiki.language module (and mediawiki.language.numbers), this could probably be implemented in one of those (or in another one in mediawiki.language "namespace").