8000 GitHub - underway2014/eval-expression
[go: up one dir, main page]

Skip to content

underway2014/eval-expression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eval-math-expression

Evaluate math expressions from String, Currently, only addition, subtraction, multiplication, and division are supported

Install

npm i eval-math-expression

Use

ES module:

import evalExpression from 'eval-math-expression'

evalExpression('(2+3/(3-1))*1.123')  // result: 3.9305

CommonJS:

const evalExpression = require('eval-math-expression').default

evalExpression('(2+3/(3-1))*1.123') // result: 3.9305

Build

npm run build

Test

npm run test

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0