A basic JavaScript converter for units of measurement.