# expr-parser

> this is a simple javascript expression parser

Latest version **1.0.0** (published 2018-11-24) · MIT license · 0 weekly downloads

## Install

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

## 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.0.0 |
| Published | 2018-11-24 |
| First published | 2018-11-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 19.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 48 |
| Author | june_01 |
| Maintainers | juneandgreen |
| Keywords | javascript, expression, parser |

## Links

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

## 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.0.0 (latest) — 2018-11-24
- 0.0.1 — 2018-11-24

## README

# expr-parser

[![](https://img.shields.io/npm/v/expr-parser.svg?style=flat)](https://www.npmjs.org/package/expr-parser)
[![](https://img.shields.io/travis/JuneAndGreen/expr-parser.svg)](https://github.com/JuneAndGreen/expr-parser)
[![](https://img.shields.io/npm/l/expr-parser.svg)](https://github.com/JuneAndGreen/expr-parser)
[![](https://img.shields.io/coveralls/github/JuneAndGreen/expr-parser.svg)](https://github.com/JuneAndGreen/expr-parser)

## 简介

一个方便好用的 js 表达式解析器

## 安装

```bash
npm install --save expr-parser
```

## 使用

```
const Expression = require('expr-parser');

const exprCalc = new Expression('a.value + 12 - (2 * 14 / 4)').parse();

console.log(exprCalc({
    a: {
        value: 3 
    },
})); // 传入数据，输出计算结果 8
```

> 更多用法请参考[测试用例](./test.js)。

## 协议

MIT

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