0.0.5 • Published 3 years ago

js-formula-parser v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

GitHub watchers GitHub watchers GitHub watchers GitHub watchers

This is a fully flexible formula parser based on Node

Table of Contents

Features

  • Node based
  • Simple Javascript methods
  • Carefully evaluated priorities
  • Appropriate infix/prefix/postfix operations

🤲 Want to Motivate?

Who doesn't need motivation? Please give the project a star(⭐) and/or share it in your dev circle.

When do you need it

  • Has got complex formula needs to be evaluated?

Install 🐙

npm install formula-parser

or

yarn add formula-parser

Usage

import {parseFormula} from 'array-initializer'

// const value = ('Your complex formula');
const value = ('(4*(6)^2)+(2*(123))+243/sin(80)');

Highlight 🔥

It was frustrating for me when I was looking for some easy way to evaluate complex formulae in various part of my application.

Available Operators

OperatorDescriptionPositioning
+Additionprefix
-Subtractionprefix
+Multiplicationprefix
/Divisionprefix
(Bracket openprefix
)Bracket closepostfix
,Comainfix
^Powerinfix
!Factorialpostfix
absAbsolutefunction
minMinimumfunction
sqrtSquare rootfunction
sinSin functionprefix
cosCos functionprefix

Items in queue

  • Logically endless combinations

Contribution 🍰

If you understand the importance please feel free to create issue and make pull request

Refer code of conduct

Refer contributing

License

MIT © Koustov

0.0.5

3 years ago

0.0.4

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago