Miss any of our Open RFC calls?Watch the recordings here! »

parse-price

1.1.8 • Public • Published

parse-price

Travis CI codecov dependencies status lib size

Returns a Number from a localized price string.

Installation

npm install --save parse-price

Usage

Receives a string (price) as input and returns a Number (or NaN) as output.

var parsePrice = require('parse-price')
 
parsePrice('€1.234,56') // => 1234.56
parsePrice('US$ 1.234,56') // => 1234.56
parsePrice('£1,234.56') // => 1234.56
parsePrice('R$1.234,56') // => 1234.56
parsePrice('1 234,56 руб') // => 1234.56
parsePrice('1,234.56 ₪') // => 1234.56

caiogondim.com  ·  GitHub @caiogondim  ·  Twitter @caio_gondim

Install

npm i parse-price

DownloadsWeekly Downloads

613

Version

1.1.8

License

MIT

Unpacked Size

16.6 kB

Total Files

13

Last publish

Collaborators

  • avatar