# parse-price

> returns a Number from a localized price string

Latest version **1.1.8** (published 2018-03-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install parse-price
pnpm add parse-price
yarn add parse-price
bun add parse-price
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.8 |
| Published | 2018-03-28 |
| First published | 2016-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 16.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Caio Gondim |
| Maintainers | caiogondim |
| Keywords | parse, number, localization, price, i10n, i18n, internationalization |

## Links

- npm: https://www.npmjs.com/package/parse-price
- Repository: https://github.com/caiogondim/parse-price.js
- Homepage: https://github.com/caiogondim/parse-price.js#readme
- Issues: https://github.com/caiogondim/parse-price.js/issues
- npm.io page: https://npm.io/package/parse-price

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.1.8 (latest) — 2018-03-28
- 1.1.6 — 2018-02-23
- 1.1.5 — 2018-02-23
- 1.1.4 — 2017-11-16
- 1.1.3 — 2016-08-03
- 1.1.2 — 2016-08-03
- 1.1.0 — 2016-08-03
- 1.0.0 — 2016-08-02

## README

<img src="http://rawgit.com/caiogondim/parse-price.js/master/logo/banner.svg">

# parse-price
<img src="http://travis-ci.org/caiogondim/parse-price.js.svg?branch=master" alt="Travis CI"> [![codecov](https://codecov.io/gh/caiogondim/parse-price.js/branch/master/graph/badge.svg)](https://codecov.io/gh/caiogondim/parse-price.js) <img src="https://david-dm.org/caiogondim/parse-price.js/status.svg" alt="dependencies status"> <img src="http://img.badgesize.io/caiogondim/parse-price.js/master/dist/parse-price.min.js?compression=gzip" alt="lib size">

Returns a `Number` from a localized price string.


## Installation

```shell
npm install --save parse-price
```

## Usage

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

```js
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](https://caiogondim.com) &nbsp;&middot;&nbsp;
GitHub [@caiogondim](https://github.com/caiogondim) &nbsp;&middot;&nbsp;
Twitter [@caio_gondim](https://twitter.com/caio_gondim)

---
_Source: https://npm.io/package/parse-price · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
