deabbreviate-number
v1.0.0
Published
Deabbreviates a number string and remove unit letters e.g. '3.5m' => 3500000
Downloads
51
Maintainers
Readme
deabbreviate-number
Deabbreviates a number string and remove unit letters e.g. '3.5m' => 3500000
Code inspired by js-number-abbreviate
Example
var deabbreviate = require('deabbreviate-number')
deabbreviate('1k') // => 1000
deabbreviate('1.25K') // => 1250
deabbreviate('1 M') // => 1000000
deabbreviate('1b') // => 1000000000
Installation
npm install deabbreviate-number --save