Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pie-framework/expression-parser
A simple math expression parser/calculator
https://github.com/pie-framework/expression-parser
Last synced: about 1 month ago
JSON representation
A simple math expression parser/calculator
- Host: GitHub
- URL: https://github.com/pie-framework/expression-parser
- Owner: pie-framework
- Created: 2018-03-06T21:47:27.000Z (almost 7 years ago)
- Default Branch: develop
- Last Pushed: 2018-03-08T20:00:46.000Z (almost 7 years ago)
- Last Synced: 2024-12-08T22:11:45.349Z (2 months ago)
- Language: TypeScript
- Size: 145 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# expression-parser
A simple math expression parser/calculator.
```javascript
import {calculate} from '@pie-framework/expression-parser';calculate('2 + log(10) * sin(22)').value // => 1.9911486907
```
## Install
```shell
npm install @pie-framework/expression-parser
#or
yarn add @pie-framework/expression-parser
```## supported
Have a look at the tests. Most basic functions you'd find on a scientific calculator.
> implicit multiplication: `2(4) = 8` isn't supported at the moment