Javascript parser that translates human metric value strings into integers (1kg -> 1000)