dividab / uom

Extensible unit of measure conversion with type safety for typescript
MIT License
18 stars 1 forks source link

Customize units #26

Closed Jontem closed 5 years ago

Jontem commented 5 years ago

Solves parts of the discussion in #19

codecov[bot] commented 5 years ago

Codecov Report

Merging #26 into master will increase coverage by 0.11%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #26      +/-   ##
==========================================
+ Coverage   86.37%   86.49%   +0.11%     
==========================================
  Files         149      149              
  Lines        1409     1414       +5     
  Branches       82       86       +4     
==========================================
+ Hits         1217     1223       +6     
+ Misses        192      191       -1
Impacted Files Coverage Δ
src/format.ts 100% <100%> (+5.88%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 328d9f5...a79505b. Read the comment docs.

Jontem commented 5 years ago

What do you think about the order of the arguments. Putting the units object last makes it possible to be optional... Otherwise everyone even those who don't want a custom selection of units needs to pass the units objects.