- deprecate
Unitsub-namespace, setting up the unit classes right under measurement (measurement.Speedinstead ofmeasurement.Unit.Speed) --> to be removed in v1.0 - Make Constants usable everywhere, so one may never have to use strings and maximise IDE code-completion gains
mm(mm.Speed).convert(...)(currently it still needs a string there) - either completely externalise DEFINITIONS array or make other unit definitions loadable in a simple way
- dynamically generate a
toString()method on unit classes, so"My " + measurement.Speedwill evaluate toMy Speedrather thanMy [object Object]- this will also provoke type-sensitive programming in users
- Evaluate marking a measurement as conforming to the metric system. Decision framework:
- MUST save space by making explicit configuration redundant
- MUST be easy to understand how to use for measurement definitions
- MUST NOT have a negative impact on performance
- Externalise localised names and descriptions currently stored in main script file
- main file MUST only include
en(and alsoen_GBwhere applicable)
- main file MUST only include
- Implement printing localised unit descriptions identified by ISO-639 codes
- SHOULD map
en_AU,en_BZ,en_IE,en_JM,en_NZ,en_TT,en_UK(not part of ISO but commonly used) &en_ZAtoen_GB - MUST assume American English for any other code starting
enas this will cover slightly more native speakers than otherwise
- SHOULD map
- Implement at least 3 localisations based on those features
- Raise float precision (currently ~7 digits) when cross-converting between types of common-base type
- Implement more conversions, such as
- Weight
- Area (Distance^2)
- Volume (Distance^3)
- Make Unit Configs seperatable from measurement.js
- Set up completely test-driven project with contiuous integration on Travis CI
- Implement easy-to-use, behaviour driven API
- Implement basic conversions for
- Speed
- Pressure
- Distance
- Temperature
- Duration