Comments (3)
Thank you for sharing, that looks really cool. I especially like this one: (1 egg / day + 1 croissant / mile) • (2 day + 4 mile) = (2 egg + 4 croissant)
Have you thought about publishing this as its own npm library? There might be some issues with adding this upstream, since your syntax which allows adding units of different dimensions (egg
and egg / day
) is not really compatible with the existing syntax which does not allow this. Maybe you could use math.js's array type to represent an aggregate sum? Whether you go that route or not, I think your code looks great and it would be pretty useful as its own library.
from unitmath.
from unitmath.
Sure, I think the best way is to open a new issue over at https://github.com/josdejong/mathjs/issues.
Good luck!
from unitmath.
Related Issues (20)
- Name confusion with prefixes HOT 1
- Proposition: Units should be printed in explicit form
- Auto add quantities, base quantities, and/or unit systems HOT 6
- Transform between systems (US, Imperial, Metric, etc) HOT 2
- valueOf should be useful for sorting HOT 6
- compare() doesn't handle NaN very well HOT 1
- API is getting too complicated and it's not even at v1.0 yet HOT 10
- TypeScript? HOT 2
- `for(let unit in ...) { unit.quantity` HOT 2
- v1.0 HOT 6
- Implement an explicit method to prevent a unit from being simplified HOT 8
- Simplify the API of the formatter HOT 4
- Fix test:compiled and test:bundle. Does it actually work when loading in a browser?
- Typescript Support for users of the library HOT 6
- Dependency resolving issue HOT 2
- SyntaxError: Cannot use import statement outside a module HOT 3
- simplify is overly aggressive for composed units HOT 10
- Feature request: function to select the "best" unit among a list
- Add a `getMatchingUnits` method HOT 3
- Bug: Error on expo app with metro on import
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unitmath.