{"_id":"@artginzburg/calc","name":"@artginzburg/calc","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.4":{"name":"@artginzburg/calc","version":"1.0.4","description":"Evaluate mathematical expressions","main":"dist/calc","types":"dist/calc.d.ts","repository":{"type":"git","url":"git+https://github.com/Motardo/calc.git"},"keywords":["mathematic","parser","calculator","shunting-yard-algorithm","javascript"],"author":{"name":"Nathan Wilson"},"license":"ISC","bugs":{"url":"https://github.com/Motardo/calc/issues"},"homepage":"https://github.com/Motardo/calc#readme","devDependencies":{"@types/node":"^18.11.18","ts-node":"^10.9.1","typescript":"^4.9.4"},"scripts":{"test":"ts-node test","build":"tsc"},"_id":"@artginzburg/calc@1.0.4","_integrity":"sha512-PcKZUiCfLx0SGNceRRnWQURacCzyZbji9qugKJ/F7sto1KX/ueUsxnWvK13pW70Tz8lCq8QYB3C/jiFN0jCu8g==","_resolved":"/private/var/folders/6s/hvpnt2555zq47lhc7sb2704w0000gn/T/e9271a3e791a1fea49104751ea176b21/artginzburg-calc-1.0.4.tgz","_from":"file:artginzburg-calc-1.0.4.tgz","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-PcKZUiCfLx0SGNceRRnWQURacCzyZbji9qugKJ/F7sto1KX/ueUsxnWvK13pW70Tz8lCq8QYB3C/jiFN0jCu8g==","shasum":"79d9278bf49825d139d4d48a477562550f295ad9","tarball":"https://registry.npmjs.org/@artginzburg/calc/-/calc-1.0.4.tgz","fileCount":9,"unpackedSize":43804,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHxfsokQrwLjxVpg2EtlvAmPklNb1xiMUFjdI334yn4FAiB5nOb+VGkgGaB4ikEvUjZcPAHs56tTow50BTV1hzitOw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjr1yOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpByBAAn2GNdqIBkdXgTgbFvUoRxQg45/Xsd4UWDPZaIUBOco2UZH7n\r\n0BVrdGPG/nmMePXwxi5WQbnbqutLzOdyyll8mHjIwbFpabrdd1O1sRgi0u72\r\nKfD1IveyDsMzpKHc+IaIe2eC5D1tpkGImT2TlcZK8X9+hMEs6NUfDK1BAb8S\r\nPz6//HLlrYytWhXN+G0AsTaQkJckOflVM/rKWI7qoPL1/dx2c2XOwyFu1L56\r\nE2gtBWxoDqBYv7kFa54ALrmjjFCSRrOX7/P8josO26MOrm/XIGc5AEzd4oVw\r\n9/M6E3JUZVnizaEZElxilMzwOVKIPiwyO9IHS+SqssdJ3jWXVYfm2PFsUdBc\r\nD5peAs8WlnJoNheZlV7a+cXYLm3UyV4eyVl8qOP/CUSM2CdNe9mZc2ZEdGDM\r\nrVGdrCDfM5/KCikGAZ12LUiKuD+CJ6BAXhs1YXqpbzjVpBVc7vqsD9/OVmX0\r\nExFqdheMWyxVnO7j0z2Gsafi3rOsyGEU31jsfsgCp8VTKnBpi3+rjgE/s9Ri\r\nOHFPHHH+mF6pHe5pID4T4Nc9xCD09gq1NsfBuJyUS/K/uJeWBSlpYEgtrES1\r\n/jwo2TsfoC7dZOQGpHKTuUOhWYaDce9bp+vfODI3+vGHqEYbSh20F0oROfea\r\nxPWz09DlpmIJ+6RgO/PZCHk3qgeZDHHHbYs=\r\n=tLqS\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"artginzburg","email":"ginzburg.arthur@gmail.com"},"directories":{},"maintainers":[{"name":"artginzburg","email":"ginzburg.arthur@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/calc_1.0.4_1672436878385_0.44192417440230747"},"_hasShrinkwrap":false}},"time":{"created":"2022-12-30T21:47:58.325Z","1.0.4":"2022-12-30T21:47:58.543Z","modified":"2022-12-30T21:47:58.755Z"},"maintainers":[{"name":"artginzburg","email":"ginzburg.arthur@gmail.com"}],"description":"Evaluate mathematical expressions","homepage":"https://github.com/Motardo/calc#readme","keywords":["mathematic","parser","calculator","shunting-yard-algorithm","javascript"],"repository":{"type":"git","url":"git+https://github.com/Motardo/calc.git"},"author":{"name":"Nathan Wilson"},"bugs":{"url":"https://github.com/Motardo/calc/issues"},"license":"ISC","readme":"# calc\n### Calculates mathematical expressions\nThe `calc` function takes a string argument and returns the value of the resulting calculation.\n\n## Install\n```sh\nnpm install @motardo/calc\n```\n\n## Usage\n```js\nvar calc = require(\"@motardo/calc\");\n\ncalc(\"1+2\")          // 3\ncalc(\"-1 / 2\")       // -0.5\ncalc(\"2 + 3 * 4\")    // 14\ncalc(\"(2+3)*4\")      // 20\ncalc(\"5^2\")          // 25\n```\n\n## Demo\nTry it out at [https://motardo.github.io/calc/web/index.html](https://motardo.github.io/calc/web/index.html)\n\n## Testing\nRun the tests with:\n```sh\nnpm test\n```\n\n## About\ncalc uses the shunting yard algorithm and two separate stacks, one for numerical values, and one for operators. The operators currently supported are + - * / and ^. Parenthesis can be used to override operator precedence.\n\n## TODO\n- [ ] Add support for shorthand scientific notation as in `1e9` for 1 billion\n- [ ] Add support for trigonometric functions\n- [ ] Add support for `log` and `ln` notation\n\n## Bugs\nBug reports and contributions are welcome. Open an issue on [github](http://github.com/Motardo/calc/issues/new) or email the author at nswilson@gmail.com\n","readmeFilename":"README.md"}