Eric Mansfield
Eric Mansfield
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...
Yeah that's a good suggestion, I agree that the different use case for `.to()` without arguments could be confusing. There will still be a side effect of using `.to(valuelessUnit)`, which...
Ah, good catch! Actually we still need the property name `unit`, so maybe: ```js // Did not find a matching unit in the system // 4. Build a representation from...
No, you are right. Disregard the code in my previous comment. `proposedUnitList[].unit` is supposed to be an object, not a string. I guess we really do need those type definitions!
I'm definitely open to implementing `valueOf`, but it's not clear to me what primitive value to return. Should it be the "number" part of the unit? Or the number converted...
Yep, UnitMath already has a `compare` function. I don't know how it would look using lodash, but in regular JavaScript you can use: ```js units.sort((a, b) => a.compare(b)) ```
1. Since the unit system is now part of the math.js config, then if the config is changed, the custom units are recreated in a new instance of UnitMath. If...
I've updated the UnitMath [README.](https://github.com/ericman314/UnitMath/blob/a83e4d8ff4af86cdd5dd85325fc454873cefc6c5/README.md) I renamed the `system` option to `autoAddToSystem` to avoid confusion with other similarly named symbols. I haven't started the implementation yet, but if you would,...
You added a conversion from 'any' to 'Promise'. Is there any way to make that conversion work the other direction? For instance, by changing typed-function so that when a promise...
That would make functions like math.evaluate have to return a promise, wouldn't it, like in your example? It would be awesome if it could "just work", where if any of...