{"id":19493296,"url":"https://github.com/negrel/mep","last_synced_at":"2026-04-15T21:31:34.333Z","repository":{"id":50546034,"uuid":"327704490","full_name":"negrel/mep","owner":"negrel","description":":heavy_division_sign: - MEP is a mathematical expression parser written in TypeScript","archived":false,"fork":false,"pushed_at":"2023-11-07T19:27:41.000Z","size":688,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-06T00:00:08.184Z","etag":null,"topics":["expression-parser","javascript","math","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/negrel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-07T19:20:16.000Z","updated_at":"2025-02-10T18:13:01.000Z","dependencies_parsed_at":"2023-11-07T22:21:39.153Z","dependency_job_id":"d184e850-d96c-4c0d-bd5a-93b77183f8ed","html_url":"https://github.com/negrel/mep","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/negrel/mep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/negrel%2Fmep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/negrel%2Fmep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/negrel%2Fmep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/negrel%2Fmep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/negrel","download_url":"https://codeload.github.com/negrel/mep/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/negrel%2Fmep/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31861292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expression-parser","javascript","math","typescript"],"created_at":"2024-11-10T21:25:13.468Z","updated_at":"2026-04-15T21:31:34.312Z","avatar_url":"https://github.com/negrel.png","language":"TypeScript","funding_links":["https://www.buymeacoffee.com/negrel"],"categories":[],"sub_categories":[],"readme":"\u003cdiv\u003e\n\t\u003ca src=\"https://standardjs.com\"\u003e\n\t\t\u003cimg src=\"https://cdn.rawgit.com/standard/standard/master/badge.svg\" alt=\"standardjs badge\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://github.com/negrel/ringo/raw/master/LICENSE\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/badge/license-MIT-green\"\u003e\n\t\u003c/a\u003e\n\u003c/div\u003e\n\n# :heavy_division_sign: - MEP is a dependency free mathematical expression parser written in TypeScript.\n\n## Why ?\n\nI needed an **extensible** mathematical expression parser for\n[1Calc](https://github.com/OG-Suite/1calc)\n\nThis package does the following:\n\n- Lex mathematical expressions with **custom** operations, constants and\n  functions into tokens\n- Parse tokens and return an\n  [RPN](https://en.wikipedia.org/wiki/Reverse_Polish_notation) array of\n  `numbers` / `Operation`.\n- Compute an [RPN](https://en.wikipedia.org/wiki/Reverse_Polish_notation) array\n  and return the result\n\n## Installation\n\nUsing ES modules:\n\n```js\nimport * mep from \"https://deno.land/x/http_ece@v0.1.0/mod.ts\";\n```\n\nUsing npm:\n\n```shell\n$ npm install @negrel/mep\n```\n\nYou can now import `mep` as an ES modules or a CommonJS module.\n\n## Exemple\n\n```js\nimport { compute, registerConstant } from \"@negrel/mep\";\n// or\n// const { compute, registerConstant } = require('@negrel/mep')\n\nconsole.log(\"Result:\", compute(\"log2(5 * 65 + cos(PI ^ 2))\"));\n// Result: 8.340283256791498\n\nregisterConstant(\"PI2\", Math.PI ** 2);\nconsole.log(\"Result:\", compute(\"log2(5 * 65 + cos(PI2))\"));\n// Result: 8.340283256791498\n```\n\n### Contributing\n\nIf you want to contribute to MEP to add a feature or improve the code contact me\nat [negrel.dev@protonmail.com](mailto:negrel.dev@protonmail.com), open an\n[issue](https://github.com/negrel/MEP/issues) or make a\n[pull request](https://github.com/negrel/MEP/pulls).\n\n## :stars: Show your support\n\nPlease give a :star: if this project helped you!\n\n[![buy me a coffee](.github/images/bmc-button.png)](https://www.buymeacoffee.com/negrel)\n\n#### :scroll: License\n\nMIT © [Alexandre Negrel](https://www.negrel.dev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnegrel%2Fmep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnegrel%2Fmep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnegrel%2Fmep/lists"}