safe-units
safe-units copied to clipboard
value in an unit
Hello!
Would appreciate an escape-hatch to get the value in a particular unit, e.g.
Measure.of(8, furlongs).valueIn(miles)
returns numeric 1
.
Hi @raoz,
This is possible right now via:
Measure.of(8, furlongs).over(miles).value
Does this solve your use case?
Hi @jscheiny,
Thanks, this does solve it for now, might make a pull request soon to add the valueIn
sugar for clarity, if you don't mind.