We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In order to 'normalize' the user entered quantities in a database I create a JSON that contains 2 properties:
I would like to have a code like:
const qty = Qty.parse('100 cm^2'); return { SI: qty.baseScalar, unit: qty.getUnit(), // this would contain 'cm^2' };
I could not find a way to achieve this getUnit with js-quantities. Is this possible ?
getUnit
The text was updated successfully, but these errors were encountered:
Isn't Qty(123, 'cm2').units() enough?
Qty(123, 'cm2').units()
Otherwise you can play around with toBase() maybe?
toBase()
Sorry, something went wrong.
No branches or pull requests
In order to 'normalize' the user entered quantities in a database I create a JSON that contains 2 properties:
I would like to have a code like:
I could not find a way to achieve this
getUnit
with js-quantities. Is this possible ?The text was updated successfully, but these errors were encountered: