# physical-parser

> Try to parse a string containing physical data like bp, mp

Latest version **0.4.0** (published 2023-04-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install physical-parser
pnpm add physical-parser
yarn add physical-parser
bun add physical-parser
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2023-04-04 |
| First published | 2021-01-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Luc Patiny |
| Maintainers | cheminfo-bot |

## Links

- npm: https://www.npmjs.com/package/physical-parser
- Repository: https://github.com/cheminfo/physical-parser
- Homepage: https://github.com/cheminfo/physical-parser#readme
- Issues: https://github.com/cheminfo/physical-parser/issues
- npm.io page: https://npm.io/package/physical-parser

## Dependencies (1)

- [js-quantities](https://npm.io/package/js-quantities.md) ^1.7.6

## Recent versions

- 0.4.0 (latest) — 2023-04-04
- 0.3.2 — 2023-01-03
- 0.3.0 — 2021-02-03
- 0.2.0 — 2021-02-03
- 0.1.1 — 2021-01-30
- 0.1.0 — 2021-01-30
- 0.0.3 — 2021-01-30

## README

# physical-parser

[![NPM version][npm-image]][npm-url]
[![build status][ci-image]][ci-url]
[![Test coverage][codecov-image]][codecov-url]
[![npm download][download-image]][download-url]

Try to parse a string containing physical data like bp, mp.

## Installation

`$ npm i physical-parser`

## Usage

```js
import { parseBoilingPoint, parseDensity, parseRefactiveIndex, parseNumbersUnits } from 'physical-parser';

let bp = parseBoilingPoint('100-120 @ 50 mmHg', {
  temperature: {
    defaultUnits: '°C'
  }
  pressure: {
    defaultValue: 760,
    defaultUnits: 'mmHg'
  }
})

// bp: {temperature: {low: 100, high: 120, units: '°C'}, pressure: {low: 50, units: 'mmHg'}};

let density = parseDensity('1.5-1.51, t=25', {
  value: {
    defaultUnits: 'g/mL'
  },
  temperature: {
    defaultUnits: '°C'
  }
})

// density: {low: 1.5, high: 1.51, units: 'g/mL'}


```

## [API Documentation](https://cheminfo.github.io/physical-parser/)

## License

[MIT](./LICENSE)

[npm-image]: https://img.shields.io/npm/v/physical-parser.svg
[npm-url]: https://www.npmjs.com/package/physical-parser
[ci-image]: https://github.com/cheminfo/physical-parser/workflows/Node.js%20CI/badge.svg?branch=main
[ci-url]: https://github.com/cheminfo/physical-parser/actions?query=workflow%3A%22Node.js+CI%22
[codecov-image]: https://img.shields.io/codecov/c/github/cheminfo/physical-parser.svg
[codecov-url]: https://codecov.io/gh/cheminfo/physical-parser
[download-image]: https://img.shields.io/npm/dm/physical-parser.svg
[download-url]: https://www.npmjs.com/package/physical-parser

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