renanvalentin / formula-runner

Formula Runner is a TypeScript library for evaluating mathematical expressions in infix notation, similar to those used in spreadsheet.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Formula Runner

Formula Runner is a TypeScript library for evaluating mathematical expressions in infix notation, similar to those used in spreadsheet. It supports basic arithmetic operations, parentheses, and exponentiation.

Usage

To use Formula Runner, you can import the evaluate function from the formula-runner module:

import { evaluate } from "./formula-runner";

const matrix: Matrix = [
  [1, 2, 3],
  [4, 5, 6],
  [7, 8, 9],
];

evaluate("MAX((SUM(A1:B2) / C1) * 5, 30)", matrix); // 30

About

Formula Runner is a TypeScript library for evaluating mathematical expressions in infix notation, similar to those used in spreadsheet.


Languages

Language:TypeScript 98.8%Language:JavaScript 1.2%