JSPM

magnitudetonumber

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q21911F
  • License MIT

Convert magnitude to number

Package Exports

  • magnitudetonumber

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (magnitudetonumber) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Converts Billion, Million and Trillion strings to integer numbers.

magnitudeToNumber('100,000') // 100000 
magnitudeToNumber('1M') // 1000000
magnitudeToNumber('2M') // 2000000
magnitudeToNumber('2.5M') // 2500000
magnitudeToNumber('5M') // 5000000