Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

value in an unit #163

Closed
raoz opened this issue Apr 28, 2021 · 2 comments · Fixed by #185
Closed

value in an unit #163

raoz opened this issue Apr 28, 2021 · 2 comments · Fixed by #185

Comments

@raoz
Copy link

raoz commented Apr 28, 2021

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.

@jscheiny
Copy link
Owner

Hi @raoz,

This is possible right now via:

Measure.of(8, furlongs).over(miles).value

Does this solve your use case?

@raoz
Copy link
Author

raoz commented Apr 30, 2021

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.

raoz added a commit to fractorysolutions/safe-units that referenced this issue May 21, 2021
raoz added a commit to fractorysolutions/safe-units that referenced this issue May 21, 2021
raoz added a commit to fractorysolutions/safe-units that referenced this issue May 21, 2021
raoz added a commit to fractorysolutions/safe-units that referenced this issue May 21, 2021
raoz added a commit to fractorysolutions/safe-units that referenced this issue May 21, 2021
raoz added a commit to fractorysolutions/safe-units that referenced this issue May 21, 2021
raoz added a commit to fractorysolutions/safe-units that referenced this issue May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants