npm.io
0.2.0 • Published 4 years ago

@lukasdotcom/math-solver

Licence
MIT
Version
0.2.0
Deps
0
Size
36 kB
Vulns
0
Weekly
0
Stars
2

Math Solver

Tries to solve any math problem. Currently all it does is the classic operators and adds them together while following order of operations. To install just run the command below:

npm i math-solver

Example

To use this all you do is have this code and change the string in the function to whatever you want to solve. Note that currently only the basic operators are supported. The simpleMath function then returns an array of steps in the key steps and returns the answer under the key answer.

import { simpleMath } from "@lukasdotcom/math-solver";

simpleMath("1+1");

You can also use this syntax:

const mathSolver = require("@lukasdotcom/math-solver");

mathSolver.simpleMath("1+1");

Keywords