Closed josdejong closed 1 year ago
I'm not sure. I definitely agree that the documentation on formatter
is too complicated though. I don't remember if there was a reason we had to support passing user args into the formatter. Maybe when I wrote it I had just learned about JavaScript's spread operator and was looking for a nail to hit with that hammer. I may just leave it undocumented.
👍 not a big deal, I just felt like the API could be a bit simpler without sacrificing anything.
I ended up taking your advice in 1.0.0-rc2 and removed the additional arguments to the custom formatter, under the principle of "you aren't gonna need it."
👍
Looking at the docs of the custom formatter, https://github.com/ericman314/UnitMath#custom-formatter , I have the feeling that the
formatter
option can be simpler, by removing the possibility to pass additional arguments to it via toString. I think you can achieve that already by changing:to