Just floating an idea here: the Unit.js class is a powerful piece of functionality on it's own, separate from math.js. It could be interesting to think about splitting it from math.js into it's own npm library, similar to the libraries Decimal.js, Fraction.js and Complex.js used by mathjs under the hood. Of course Unit.js should keep it's injection of methods like add, multiply, Complex, etc to keep it flexible and integrable).
What would we gain with it?
- Modularity. People may not need mathjs but just need to do some calculations with units.
- Focus. Moving it into a separate library can help focusing. Unit.js has it's own share of complicated problems, and being a part of a larger library (mathjs) doesn't make it easier I think.
@ericman314 do you have some thoughts in this respect?
Just floating an idea here: the
Unit.jsclass is a powerful piece of functionality on it's own, separate from math.js. It could be interesting to think about splitting it from math.js into it's own npm library, similar to the libraries Decimal.js, Fraction.js and Complex.js used by mathjs under the hood. Of course Unit.js should keep it's injection of methods likeadd,multiply,Complex, etc to keep it flexible and integrable).What would we gain with it?
@ericman314 do you have some thoughts in this respect?