0.1.0 • Published 8 years ago
mpgconvert v0.1.0
mpgconvert
Convert fuel consumption between mpg and l/100km in Node.js
The module currently supports conversions between miles per imperial gallon (mpg) and litres per 100 km.
Installation
The project is published to the npm registry, install it via your favourite package manager for node:
npm i mpgconvertIf you wish to use it as a handy tool in your command line, install it globally
npm i -g mpgconvertUsage
As a module
The module has two separate functions exported for conversions.
const { mpg, l100km } = require('mpgconvert')
mpg(38)
// 7.433711924989639
l100km(7.2)
// 45.561460185420366Command line
The package installs a command line executable named mpgc.
Usage: mpgc <command> [value]
Commands:
mpg [value] Convert fuel consumption from mpg to l/100km [aliases: m]
l100km [value] Convert fuel consumption from l/100km to mpg [aliases: l]
Options:
--version Show version number [boolean]
-h, --help Show help [boolean]Examples:
$ mpgc m 48
5.885021940616797
$ mpgc l 5.85
48.287359512753206Planned features
- Conversion to and from in US mpg
0.1.0
8 years ago