# mathjs-expression-parser **Repository Path**: mirrors_josdejong/mathjs-expression-parser ## Basic Information - **Project Name**: mathjs-expression-parser - **Description**: Just the expression parser of mathjs - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-09 - **Last Updated**: 2026-01-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # This package has been deprecated You can now use mathjs itself directly to achieve the same: ```js // use light-weight, numbers only implementations of all functions import { create, all } from 'mathjs/number' const math = create(all) const result = math.evaluate('2.4 + sqrt(x)', {x : 16}) console.log('result', result) // 6.4 ``` Read more: https://mathjs.org/docs/custom_bundling.html#numbers-only # mathjs-expression-parser Just want to use the expression parser of `mathjs` for simple, numeric calculations? Here you go... This custom build of `mathjs` contains just the expression parser and basic arithmetic functions for numbers. The expression parser contains full functionality for parsing, compiling, evaluating, and transforming expression trees. Support for Matrices, BigNumbers, Fractions, Complex numbers, Units, and all functions and constants that come with mathjs are excluded. The size of `mathjs-expression-parser` is `30 KiB` when minified and gzipped (about a quarter of the size of `mathjs`). ## Install ``` npm install mathjs-expression-parser ``` ## Use ### node.js ```js var math = require('mathjs-expression-parser') var expr = '2.4 + sqrt(x)'; console.log('result', math.eval(expr, {x : 16})); // 6.4 ``` ### browser ```html