jonahsnider/convert

I would like to convert Milliliter to liter (1000)

yesparthasarathy opened this issue ยท 4 comments

convert(1000).from('ml').to('l') , I am expecting output as 1.

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.95. Please mark this comment with ๐Ÿ‘ or ๐Ÿ‘Ž to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

The example you provided works

import { convert } from 'convert';

console.log(convert(1000).from('ml').to('l'));
// 1

We also have unit tests confirming this behavior:

convertAssert(1, 'milliliter', 1e-3, 'liter');

Upgrade to version v1.1.4, or a more recent release (v1.6.2 is the latest at the moment).
This was fixed in 8faa344.
I have deprecated the old versions with incorrect conversion ratios on npm.