# fr_arithmetic_zeng

> Calculate the arithmetic expressions

Latest version **1.2.1** (published 2022-07-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install fr_arithmetic_zeng
pnpm add fr_arithmetic_zeng
yarn add fr_arithmetic_zeng
bun add fr_arithmetic_zeng
```

## 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.2.1 |
| Published | 2022-07-22 |
| First published | 2022-07-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Henry.Zeng |
| Maintainers | npmzeng |

## Links

- npm: https://www.npmjs.com/package/fr_arithmetic_zeng
- npm.io page: https://npm.io/package/fr_arithmetic_zeng

## Recent versions

- 1.2.1 (latest) — 2022-07-22
- 1.1.1 — 2022-07-14
- 1.1.0 — 2022-07-14
- 1.0.0 — 2022-07-12

## README

# fr_arithmetic_zeng

Can be used to calculate the four arithmetic expression of integer(`+`、`-`、`*`、`/`、`(`、`)`)

## Installation
With [npm](https://www.npmjs.org/package/fr_arithmetic_zeng):
```cmd
npm install fr_arithmetic_zeng
```

## Usage
`calcu(obj)` 

`obj: {
    formula: string,
    data: {}
}`.
formula:Hold characters expression.data:Store the value of the corresponding characters.

```js
const fr = require('fr_arithmetic_zeng');
let result = fr.calcu({
             //公式
             formula: '(x+y)*z',
             //参数
             data: {
                 x: 1,
                 y: 2,
                 z: 1
             }
         });
console.log(result);    // 3
```
or
```js
const fr = require('fr_arithmetic_zeng');
let result = fr.calcu({
             //公式
             formula: '(x+y)*z',
             //参数
             data: {
                 x: "31111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
                 y: "31111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
                 z: 1
             }
         });
console.log(result);    // 62222222222222222222222222222222222222222222222222222222222222222222222222222222222222
```
Returns a string representation of integer.
obj Parameter is the object and the object needs to have attributes formula (String), data (object)

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