CNV is an npm module to convert units in the command line. This module uses the convert-units module under the hood.
I built this for myself, because I usually google to convert units. This allows me to do any conversions quickly (and offline) right in my terminal.
I also wanted to build something using Typescript and test it using ava.
Install cnv
globally
npm i -g cnv
To install it locally, use npm i cnv
instead.
cnv 50km m
Some more examples:
cnv 1m cm cnv 1lb kg cnv 100oz ml
cnv is tested using ava.
To run tests:
git clone git@github.com:nkhil/cnv.git cd cnv npm install
npm t
The source code for this website can be found here under an MIT license