{"analyzedAt":"2022-06-30T16:48:23.209Z","collected":{"metadata":{"name":"mathup","scope":"unscoped","version":"1.0.0-beta.2","description":"Easy MathML authoring tool with a quick to write syntax","keywords":["mathml","markup","math","authoring"],"date":"2020-05-04T20:12:20.561Z","author":{"name":"Rúnar Berg Baugsson Sigríðarson","email":"runarberg@zoho.com","username":"runarberg"},"publisher":{"username":"runarberg","email":"runarberg@zoho.com"},"maintainers":[{"username":"runarberg","email":"runarberg@zoho.com"}],"repository":{"type":"git","url":"git+https://github.com/runarberg/mathup.git"},"links":{"npm":"https://www.npmjs.com/package/mathup","homepage":"https://runarberg.github.io/mathup/","repository":"https://github.com/runarberg/mathup","bugs":"https://github.com/runarberg/mathup/issues"},"license":"MIT","dependencies":{"minimist":"^1.2.5","unicode-properties":"^1.3.1"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.9.6","@babel/plugin-transform-runtime":"^7.9.6","@babel/preset-env":"^7.9.6","@babel/runtime":"^7.9.6","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","ava":"^3.8.1","c8":"^7.1.1","coveralls":"^3.1.0","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.1.0","eslint-config-prettier":"^6.11.0","eslint-plugin-ava":"^10.3.0","eslint-plugin-import":"^2.20.2","eslint-plugin-prettier":"^3.1.3","expect.js":"^0.3.1","jsdom":"^16.2.2","prettier":"2.0.5","rollup":"^2.7.6","rollup-plugin-babel":"^4.4.0","rollup-plugin-terser":"^5.3.0"},"releases":[{"from":"2022-05-31T00:00:00.000Z","to":"2022-06-30T00:00:00.000Z","count":0},{"from":"2022-04-01T00:00:00.000Z","to":"2022-06-30T00:00:00.000Z","count":1},{"from":"2022-01-01T00:00:00.000Z","to":"2022-06-30T00:00:00.000Z","count":1},{"from":"2021-06-30T00:00:00.000Z","to":"2022-06-30T00:00:00.000Z","count":1},{"from":"2020-06-30T00:00:00.000Z","to":"2022-06-30T00:00:00.000Z","count":1}],"hasTestScript":true,"readme":"mathup\n======\n\n[![npm](https://img.shields.io/npm/v/mathup.svg)](https://www.npmjs.com/package/mathup)\n[![License](https://img.shields.io/npm/l/mathup)](LICENSE)\n[![Build Status](https://travis-ci.org/runarberg/mathup.svg?branch=master)](https://travis-ci.org/runarberg/mathup)\n[![Coverage Status](https://coveralls.io/repos/github/runarberg/mathup/badge.svg)](https://coveralls.io/github/runarberg/mathup)\n[![Downloads](https://img.shields.io/npm/dm/mathup)](https://npm-stat.com/charts.html?package=mathup)  \n[![dependencies](https://david-dm.org/runarberg/mathup/status.svg)](https://david-dm.org/runarberg/mathup)\n[![dev-dependencies](https://david-dm.org/runarberg/mathup/dev-status.svg)](https://david-dm.org/runarberg/mathup?type=dev)\n[![npms Score](https://badges.npms.io/mathup.svg)](https://api.npms.io/v2/package/mathup)\n\n#### Installation ####\n\n##### npm #####\n\n```bash\nnpm install mathup\n```\n\n```js\nimport mathup from \"mathup\";\n```\n\n##### Client #####\n\nDownload one of the [released assets](https://github.com/runarberg/mathup/releases)\nand include the **module**:\n\n```html\n<script type=\"module\" src=\"mathup.mjs\"></script>\n```\n\n…the **custom element**:\n\n```html\n<script type=\"module\" src=\"math-up-element.mjs\"></script>\n```\n\n…or the **script**:\n\n```html\n<script src=\"mathup.iife.mjs\"></script>\n```\n\n#### Usage ####\n\n```js\nconst expression = \"1+1 = 2\";\nconst options = {};  // optional\nconst mathml = mathup(expression, options);\n\nmathml.toString();\n// => \"<math><mrow><mn>1</mn><mo>+</mo><mn>1</mn></mrow><mo>=</mo><mn>2</mn></math>\"\n\nconst mathNode = mathml.toDOM();\n// => [object MathMLElement]\n\n// Update existing <math> node in place\nmathup(\"3-2 = 1\", { bare: true }).updateDOM(mathNode);\n```\n\n\n##### Custom Element #####\n\n```html\n<math-up\n  display=\"inline\"\n  dir=\"ltr\"\n  decimal-mark=\",\"\n  col-sep=\";\"\n  row-sep=\";;\"\n>\n  1+1 = 2\n</math-up>\n```\n\n##### Command Line #####\n\n```bash\nnpm install -g mathup\n\nmathup [options] -- <expression>\n\n# or from stdin\necho <expression> | mathup [options]\n```\n\n#### Options (with defaults) ####\n\n```js\nconst options = {\n  decimalMark: \".\",   // -m,  --decimalmark=\".\"\n  colSep: \",\",        // -c,  --colsep=\",\"\n  rowSep: \";\",        // -r,  --rowsep=\";\"\n  display: \"inline\",  // -d,  --display\n  dir: \"ltr\",         //      --rtl\n  bare: false,        // -b,  --bare\n}\n```\n\nReference\n---------\n\n[See here](http://runarberg.github.io/mathup/#reference)\n\n\nEasy MathML authoring tool with a quick to write syntax\n-------------------------------------------------------\n\nThis package exposes a single function `mathup` that intuitively takes\nsimple mathematical expressions—written in a markup language inspired\nby [*AsciiMath*](http://asciimath.org/)—and outputs structured\n[*MathML*](http://www.w3.org/Math/).\n\nYou can use it on the command line or on the server as an\n[npm](https://npmjs.com) package, or in the browser by including the\nscript source. In the browser, you choose how to parse the math in\nyour document—by looking hard for any math-y substrings, parsing all\nexpressions wrapped in `$`…`$`, or using some other excellent tools out\nthere that does it for you. And you can choose what to do with the\noutput as well—piping it to another program, inject it streight to the\nDOM, or just logging it to the console.\n\n\nWhy not just use *MathJax*?\n---------------------------\n\n[*MathJax*](http://www.mathjax.org/) is an excellent tool that you\nshould probably be using if all you want to do is include complex\nmathematical expressions in a document. And you should probably use it\n*along side* this package as well if you want\n[Chrome users](http://www.chromestatus.com/features/5240822173794304)\nto be able to read your expressions. However, MathJax is a complex\npiece of software that does a great deal more than just translate\nsimple expression into structured form, and if that is all you want to\ndo, then MathJax is definitely overkill. Mathup promises to be a\nlot faster (by doing less) then MathJax, and if the readers of your\ndocument (or users of your app) are using a\n[standard conforming browser](http://caniuse.com/#feat=mathml), they\nwill benefit a great bit. You will be able to translate your\nexpression on the server before your readers even open the document,\nreducing any lag time to native.\n\n\nWhy AsciiMath / Why not TeΧ?\n----------------------------\n\nI wrote this tool, because I wanted to be able to author mathematical\nexpressions quickly, with no overhead (imagine `1/2` instead of\n`\\frac{1}{2}`). TeΧ expressions can easily become verbose and annoying\nto write (especially on keyboards with complex access to the\n<kbd> \\ </kbd>, <kbd>{</kbd>, and <kbd>}</kbd> keys). However, the\npurpose of this package is *not* to give people complete control over\nMathML in a non-verbose way, the purpose is to make it simple for\npeople to write simple expression. Of course I’ll try to give as much\nexpressive power as possible in the way, but I won’t promise to make\nall complex things possible.\n\nIf you want full support of MathML, and don’t want to write all those\ntags perhaps you should look for another tool. There are other great\nefforts to enable people to author MathML in TeX format, take a look\nat [TeXZilla](https://github.com/fred-wang/TeXZilla) for example.\n\n\nTesting\n-------\n\nRun the test suites with:\n\n```bash\nnpm test\n```\n\nAs for manual and visual tests, if you are running node 13 or newer,\nyou don’t need to compile between edit and run as the code is written\nwithout transpilation in mind. The code works in both browsers and\nnode without any transcompilation.\n\nFor a simple test do:\n\n```bash\n./bin/mathup.mjs -- 'my expression'\n```\n\nYou can open a\n[playground](http://localhost:8000/demo/playground.html) and [test\ncases](http://localhost:8000/demo/test-cases.html) on\n<http://localhost:8000/demo> by running:\n\n```bash\nnpm run server\n```"},"npm":{"downloads":[{"from":"2022-06-29T00:00:00.000Z","to":"2022-06-30T00:00:00.000Z","count":2},{"from":"2022-06-23T00:00:00.000Z","to":"2022-06-30T00:00:00.000Z","count":23},{"from":"2022-05-31T00:00:00.000Z","to":"2022-06-30T00:00:00.000Z","count":67},{"from":"2022-04-01T00:00:00.000Z","to":"2022-06-30T00:00:00.000Z","count":287},{"from":"2022-01-01T00:00:00.000Z","to":"2022-06-30T00:00:00.000Z","count":573},{"from":"2021-06-30T00:00:00.000Z","to":"2022-06-30T00:00:00.000Z","count":1082}],"starsCount":0},"github":{"homepage":"https://runarberg.github.io/mathup","starsCount":47,"forksCount":7,"subscribersCount":4,"issues":{"count":53,"openCount":5,"distribution":{"3600":17,"10800":2,"32400":6,"97200":7,"291600":3,"874800":1,"2624400":3,"7873200":2,"23619600":3,"70858800":7,"212576400":2},"isDisabled":false},"contributors":[{"username":"runarberg","commitsCount":154},{"username":"lukasbestle","commitsCount":4},{"username":"tie","commitsCount":1},{"username":"LittleHelicase","commitsCount":1},{"username":"shellyln","commitsCount":2},{"username":"dependabot[bot]","commitsCount":8}],"commits":[{"from":"2022-06-23T00:00:00.000Z","to":"2022-06-30T00:00:00.000Z","count":0},{"from":"2022-05-31T00:00:00.000Z","to":"2022-06-30T00:00:00.000Z","count":0},{"from":"2022-04-01T00:00:00.000Z","to":"2022-06-30T00:00:00.000Z","count":0},{"from":"2022-01-01T00:00:00.000Z","to":"2022-06-30T00:00:00.000Z","count":0},{"from":"2021-06-30T00:00:00.000Z","to":"2022-06-30T00:00:00.000Z","count":0}],"statuses":[{"context":"coverage/coveralls","state":"success"},{"context":"continuous-integration/travis-ci/push","state":"success"},{"context":"github/pages","state":"success"}]},"source":{"files":{"readmeSize":5850,"testsSize":126810,"hasNpmIgnore":true},"badges":[{"urls":{"original":"https://img.shields.io/npm/v/mathup.svg","shields":"https://img.shields.io/npm/v/mathup.svg","content":"https://img.shields.io/npm/v/mathup.json"},"info":{"service":"npm","type":"version","modifiers":{"type":"v"}}},{"urls":{"original":"https://travis-ci.org/runarberg/mathup.svg?branch=master","service":"https://api.travis-ci.org/runarberg/mathup.svg?branch=master","shields":"https://img.shields.io/travis/runarberg/mathup/master.svg","content":"https://img.shields.io/travis/runarberg/mathup/master.json"},"info":{"service":"travis","type":"build","modifiers":{"branch":"master"}}},{"urls":{"original":"https://coveralls.io/repos/github/runarberg/mathup/badge.svg","service":"https://coveralls.io/repos/github/runarberg/mathup/badge.svg","shields":"https://img.shields.io/coveralls/runarberg/mathup.svg","content":"https://img.shields.io/coveralls/runarberg/mathup.json"},"info":{"service":"coveralls","type":"coverage"}},{"urls":{"original":"https://david-dm.org/runarberg/mathup/status.svg","service":"https://david-dm.org/runarberg/mathup/status.svg","shields":"https://img.shields.io/david/runarberg/mathup/status.svg","content":"https://img.shields.io/david/runarberg/mathup/status.json"},"info":{"service":"david","type":"dependencies","modifiers":{"statusType":"normal"}}},{"urls":{"original":"https://david-dm.org/runarberg/mathup/dev-status.svg","service":"https://david-dm.org/runarberg/mathup/dev-status.svg","shields":"https://img.shields.io/david/dev/runarberg/mathup.svg","content":"https://img.shields.io/david/dev/runarberg/mathup.json"},"info":{"service":"david","type":"dependencies","modifiers":{"statusType":"dev"}}}],"linters":["eslint","prettier"],"coverage":0.97}},"evaluation":{"quality":{"carefulness":0.45999999999999996,"tests":0.9954999999999999,"health":1,"branding":1},"popularity":{"communityInterest":64,"downloadsCount":95.66666666666667,"downloadsAcceleration":-0.1280251141552512,"dependentsCount":0},"maintenance":{"releasesFrequency":0.28664383561643836,"commitsFrequency":0,"openIssues":1,"issuesDistribution":0}},"score":{"final":0.5605054751522839,"detail":{"quality":0.905966650132081,"popularity":0.0771455408222467,"maintenance":0.7477558309282092}}}