Translates numbers with metric prefixes into plain JavaScript Numbers. (1kg -> 1000)
JavaScript
Switch branches/tags
Latest commit 999c100 Mar 10, 2014 @demands Get rid of lib module
Permalink
Failed to load latest commit information.
test
.gitignore
.travis.yml
LICENSE
README.md
package.json
parse-metric.js

README.md

parse-metric

Build Status NPM version browser support

Translates numbers with CI prefixes into plain JavaScript Numbers.

Examples

var parseMetric = require('parse-metric');

parseMetric('200kB');   // => 200000
parseMetric('12.75cm'); // => 0.1275