https://github.com/olamide203/hyoka Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Copilot + Packages + Security + Code review + Issues + Discussions + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Skills + GitHub Sponsors + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} olamide203 / hyoka Public * Notifications * Fork 0 * Star 5 a lightweight and precise math expression parser and evaluator for JavaScript and TypeScript License MIT license 5 stars 0 forks Star Notifications * Code * Issues 0 * Pull requests 0 * Discussions * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Projects * Security * Insights olamide203/hyoka This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 8 tags Code * Clone HTTPS GitHub CLI [https://github.com/o] Use Git or checkout with SVN using the web URL. [gh repo clone olamid] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @olamide203 olamide203 docs: fix typo in documentation ... 4502a71 Aug 26, 2022 docs: fix typo in documentation 4502a71 Git stats * 68 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github Update bug.yml Aug 26, 2022 .husky Revert "fix: fix husky" Jul 31, 2022 .vscode chore: clean up folder structures Aug 3, 2022 src fix: use named export Aug 25, 2022 test test: write tests for operator nodes Aug 3, 2022 .editorconfig chore: clean up folder structures Aug 3, 2022 .eslintignore build: modify rollup config for build step Aug 19, 2022 .eslintrc.json chore: clean up folder structures Aug 3, 2022 .gitignore build: modify rollup config for build step Aug 19, 2022 CHANGELOG.md chore(release): v1.0.6 Aug 26, 2022 LICENSE chore: clean up folder structures Aug 3, 2022 README.md docs: fix typo in documentation Aug 26, 2022 package-lock.yaml chore(release): v1.0.6 Aug 26, 2022 package.json chore(release): v1.0.6 Aug 26, 2022 pnpm-lock.yaml ci((release)): set up release workflow Aug 21, 2022 rollup.config.ts fix: fix esm bundle error Aug 26, 2022 tsconfig.json build: modify rollup config for build step Aug 19, 2022 View code hyoka Features Installation Usage README.md hyoka Version License: MIT GitHub release (latest by date) Build Status hyoka is a simple math expression parser and evaluator for JavaScript and TypeScript. it uses decimal.js to ensure precision of floating point calculations. Features * Supports implicit multiplication and parenthesis grouping * Binary and unary operators are supported * Supports mathematical functions * Precision and rounding mode can be configured Installation This library can be used in both node.js and in the browser. Using npm: npm install hyoka Using yarn: yarn add hyoka in the browser: * UMD * ESM Usage import {Expression} from 'hyoka'; new Expression('0.1 + 0.2').evaluate(); // 0.3 new Expression('2 * 6 / 3').evaluate(); // 4 // using unary prefix operators new Expression('- 1 + 2').evaluate(); // 1 new Expression('+ 1 - - 2').evaluate(); // 3 // implicit multiplication new Expression('2(6 / 3)').evaluate(); // 4 //Trig Functions new Expression('sin(p)').evaluate(); // 0 new Expression('cos(pi / 2)').evaluate(); // -0.5 // Even more complex expressions new Expression('2(4(6 / 3 + 2) + 2^3 / - 2(2.5!))').evaluate(); //5.413192236417259652 About a lightweight and precise math expression parser and evaluator for JavaScript and TypeScript Topics parser math expression evaluator Resources Readme License MIT license Stars 5 stars Watchers 1 watching Forks 0 forks Releases 8 v1.0.6 Latest Aug 26, 2022 + 7 releases Packages 0 No packages published Languages * TypeScript 99.0% * Shell 1.0% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.