A lightweight javascript conversion library for translating temperature, speed, mass and length values.
Note: The numbers are rounded up to the nearest 4th decimal point
Usage
Install using bower or npm:
bower install conversion.js
npm install conversion.js
Then load up a node console and try it out:
var convert = ;// or load a script tag if using in the client ;
Api
// TemperaturetoCelsiustoFahrenheittoKelvin // LengthtoKilometerstoMeterstoCentimeterstoMillimeterstoMilestoYardstoInchestoFeettoNauticalMiles // MasstoMetricTonstoKilogramstoGramstoMilligramstoMcgstoLongTonstoShortTonstoStonestoPoundstoOunces // SpeedtoMph // Miles per hourtoFps // Feet per secondtoMps // Meters per secondtoKph // To kilometers per hourtoKnot // To Knot
Options
precision: 4 // The decimal cutoff point at where it is rounded up
License
Conversion.js is freely distributable under the terms of the MIT license.