{"_id":"expr-eval","_rev":"3794369","name":"expr-eval","description":"Mathematical expression evaluator","dist-tags":{"latest":"2.0.2"},"maintainers":[{"name":"silentmatt","email":""}],"time":{"modified":"2025-06-05T10:28:39.000Z","created":"2016-09-14T03:34:04.382Z","2.0.2":"2019-09-28T21:26:16.055Z","2.0.1":"2019-09-10T19:09:28.701Z","2.0.0":"2019-09-08T02:55:23.813Z","1.2.3":"2019-07-10T13:55:57.291Z","1.2.2":"2018-07-03T14:55:34.665Z","1.2.1":"2017-12-21T21:42:22.282Z","1.2.0":"2017-09-25T18:33:07.523Z","1.1.1":"2017-09-06T17:43:51.210Z","1.1.0":"2017-08-30T02:08:58.995Z","1.0.1":"2017-06-10T23:01:08.863Z","1.0.0":"2017-01-02T19:53:51.868Z","1.0.0-rc.4":"2016-12-29T18:30:27.905Z","1.0.0-rc.3":"2016-11-28T20:46:45.344Z","0.12.0":"2016-10-13T05:43:33.534Z","0.10.1":"2016-10-02T21:24:12.519Z","0.10.0":"2016-09-29T04:53:19.367Z","0.9.0":"2016-09-14T03:34:04.382Z"},"users":{},"author":{"name":"Matthew Crumley"},"repository":{"type":"git","url":"git+https://github.com/silentmatt/expr-eval.git"},"versions":{"2.0.2":{"name":"expr-eval","version":"2.0.2","description":"Mathematical expression evaluator","main":"dist/bundle.js","module":"dist/index.mjs","typings":"parser.d.ts","directories":{"test":"test"},"dependencies":{},"devDependencies":{"eslint":"^6.3.0","eslint-config-semistandard":"^15.0.0","eslint-config-standard":"^13.0.1","eslint-plugin-import":"^2.15.0","eslint-plugin-node":"^9.2.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-standard":"^4.0.0","mocha":"^6.2.0","nyc":"^14.1.1","rollup":"^1.20.3","rollup-plugin-uglify":"^6.0.3"},"scripts":{"test":"npm run build && mocha","coverage":"npm run build && nyc --reporter=lcov --reporter=text-summary mocha","lint":"eslint index.js src test rollup.config.js rollup-min.config.js","watch":"rollup -c rollup.config.js -w","build":"rollup -c rollup.config.js && rollup -c rollup-min.config.js && rollup -c rollup-esm.config.js","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/silentmatt/expr-eval.git"},"keywords":["expression","math","evaluate","eval","function","parser"],"author":{"name":"Matthew Crumley"},"license":"MIT","bugs":{"url":"https://github.com/silentmatt/expr-eval/issues"},"homepage":"https://github.com/silentmatt/expr-eval#readme","gitHead":"b4cf0607cc640ed69c34bd40a2aa6cdf283c1189","_id":"expr-eval@2.0.2","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"shasum":"fa6f044a7b0c93fde830954eb9c5b0f7fbc7e201","size":35260,"noattachment":false,"key":"/expr-eval/-/expr-eval-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/expr-eval/download/expr-eval-2.0.2.tgz"},"maintainers":[{"name":"silentmatt","email":""}],"_npmUser":{"name":"silentmatt","email":"email@matthewcrumley.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expr-eval_2.0.2_1569705975905_0.06431243506867701"},"_hasShrinkwrap":false,"publish_time":1569705976055,"_cnpm_publish_time":1569705976055,"_cnpmcore_publish_time":"2021-12-16T14:17:43.072Z"},"2.0.1":{"name":"expr-eval","version":"2.0.1","description":"Mathematical expression evaluator","main":"dist/bundle.js","module":"dist/index.mjs","typings":"parser.d.ts","directories":{"test":"test"},"dependencies":{},"devDependencies":{"eslint":"^6.3.0","eslint-config-semistandard":"^15.0.0","eslint-config-standard":"^13.0.1","eslint-plugin-import":"^2.15.0","eslint-plugin-node":"^9.2.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-standard":"^4.0.0","mocha":"^6.2.0","nyc":"^14.1.1","rollup":"^1.20.3","rollup-plugin-uglify":"^6.0.3"},"scripts":{"test":"npm run build && mocha","coverage":"npm run build && nyc --reporter=lcov --reporter=text-summary mocha","lint":"eslint index.js src test rollup.config.js rollup-min.config.js","watch":"rollup -c rollup.config.js -w","build":"rollup -c rollup.config.js && rollup -c rollup-min.config.js && rollup -c rollup-esm.config.js","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/silentmatt/expr-eval.git"},"keywords":["expression","math","evaluate","eval","function","parser"],"author":{"name":"Matthew Crumley"},"license":"MIT","bugs":{"url":"https://github.com/silentmatt/expr-eval/issues"},"homepage":"https://github.com/silentmatt/expr-eval#readme","gitHead":"a7c241c0f875570a3ac9da52abf278a9cdd3fb53","_id":"expr-eval@2.0.1","_shasum":"eda69f0950064185ca6199f150254cae0d3f3d84","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.0","_npmUser":{"name":"silentmatt","email":"email@matthewcrumley.com"},"dist":{"shasum":"eda69f0950064185ca6199f150254cae0d3f3d84","size":35195,"noattachment":false,"key":"/expr-eval/-/expr-eval-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/expr-eval/download/expr-eval-2.0.1.tgz"},"maintainers":[{"name":"silentmatt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expr-eval_2.0.1_1568142568568_0.9311185467447243"},"_hasShrinkwrap":false,"publish_time":1568142568701,"_cnpm_publish_time":1568142568701,"_cnpmcore_publish_time":"2021-12-16T14:17:43.357Z"},"2.0.0":{"name":"expr-eval","version":"2.0.0","description":"Mathematical expression evaluator","main":"dist/bundle.js","module":"dist/index.mjs","typings":"parser.d.ts","directories":{"test":"test"},"dependencies":{},"devDependencies":{"eslint":"^6.3.0","eslint-config-semistandard":"^15.0.0","eslint-config-standard":"^13.0.1","eslint-plugin-import":"^2.15.0","eslint-plugin-node":"^9.2.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-standard":"^4.0.0","mocha":"^6.2.0","nyc":"^14.1.1","rollup":"^1.20.3","rollup-plugin-uglify":"^6.0.3"},"scripts":{"test":"npm run build && mocha","coverage":"npm run build && nyc --reporter=lcov --reporter=text-summary mocha","lint":"eslint index.js src test rollup.config.js rollup-min.config.js","watch":"rollup -c rollup.config.js -w","build":"rollup -c rollup.config.js && rollup -c rollup-min.config.js && rollup -c rollup-esm.config.js","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/silentmatt/expr-eval.git"},"keywords":["expression","math","evaluate","eval","function","parser"],"author":{"name":"Matthew Crumley"},"license":"MIT","bugs":{"url":"https://github.com/silentmatt/expr-eval/issues"},"homepage":"https://github.com/silentmatt/expr-eval#readme","gitHead":"32b7f9f2e9bb4f5dd551fbbb1a08cd2c84b39632","_id":"expr-eval@2.0.0","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"shasum":"3d50058d8723f8f841d76d1378c001cf7ed26ae5","size":34528,"noattachment":false,"key":"/expr-eval/-/expr-eval-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/expr-eval/download/expr-eval-2.0.0.tgz"},"maintainers":[{"name":"silentmatt","email":""}],"_npmUser":{"name":"silentmatt","email":"email@matthewcrumley.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expr-eval_2.0.0_1567911323679_0.4248983078582784"},"_hasShrinkwrap":false,"publish_time":1567911323813,"_cnpm_publish_time":1567911323813,"_cnpmcore_publish_time":"2021-12-16T14:17:43.679Z"},"1.2.3":{"name":"expr-eval","version":"1.2.3","description":"Mathematical expression evaluator","main":"dist/bundle.js","typings":"parser.d.ts","directories":{"test":"test"},"dependencies":{},"devDependencies":{"eslint":"^5.12.1","eslint-config-semistandard":"^13.0.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.15.0","eslint-plugin-node":"^8.0.1","eslint-plugin-promise":"^4.0.1","eslint-plugin-standard":"^4.0.0","istanbul":"^0.4.5","mocha":"^5.0.0","rollup":"^0.63.0","rollup-plugin-uglify":"^3.0.0"},"scripts":{"test":"npm run build && mocha","coverage":"npm run build && istanbul cover _mocha","lint":"eslint index.js src test rollup.config.js rollup-min.config.js","build":"rollup -c rollup.config.js && rollup -c rollup-min.config.js","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/silentmatt/expr-eval.git"},"keywords":["expression","math","evaluate","eval","function","parser"],"author":{"name":"Matthew Crumley"},"license":"MIT","bugs":{"url":"https://github.com/silentmatt/expr-eval/issues"},"homepage":"https://github.com/silentmatt/expr-eval#readme","gitHead":"49a85eb189ff1e08f944486c4859aebc70edc201","_id":"expr-eval@1.2.3","_shasum":"d61b3ae6b753a56ce4d3eff3b72c7cbe19a80ca8","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.2.6","_npmUser":{"name":"silentmatt","email":"email@matthewcrumley.com"},"dist":{"shasum":"d61b3ae6b753a56ce4d3eff3b72c7cbe19a80ca8","size":20323,"noattachment":false,"key":"/expr-eval/-/expr-eval-1.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/expr-eval/download/expr-eval-1.2.3.tgz"},"maintainers":[{"name":"silentmatt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expr-eval_1.2.3_1562766957148_0.10908297276990409"},"_hasShrinkwrap":false,"publish_time":1562766957291,"_cnpm_publish_time":1562766957291,"_cnpmcore_publish_time":"2021-12-16T14:17:44.389Z"},"1.2.2":{"name":"expr-eval","version":"1.2.2","description":"Mathematical expression evaluator","main":"dist/bundle.js","typings":"parser.d.ts","directories":{"test":"test"},"dependencies":{},"devDependencies":{"eslint":"^4.19.0","eslint-config-semistandard":"^12.0.1","eslint-config-standard":"^11.0.0","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^6.0.0","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^3.0.1","istanbul":"^0.4.5","mocha":"^5.0.0","rollup":"^0.62.0","rollup-plugin-uglify":"^3.0.0"},"scripts":{"test":"npm run build && mocha","coverage":"npm run build && istanbul cover _mocha","lint":"eslint index.js src test rollup.config.js rollup-min.config.js","build":"rollup -c rollup.config.js && rollup -c rollup-min.config.js","prepublish":"npm run build"},"files":["dist/","parser.d.ts"],"repository":{"type":"git","url":"git+https://github.com/silentmatt/expr-eval.git"},"keywords":["expression","math","evaluate","eval","function","parser"],"author":{"name":"Matthew Crumley"},"license":"MIT","bugs":{"url":"https://github.com/silentmatt/expr-eval/issues"},"homepage":"https://github.com/silentmatt/expr-eval#readme","gitHead":"debf3ec645c38b40d9fb8c40c5dd023572f91317","_id":"expr-eval@1.2.2","_shasum":"8b1a160b814e67da7652007e2693714895221ea0","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.2.6","_npmUser":{"name":"silentmatt","email":"email@matthewcrumley.com"},"dist":{"shasum":"8b1a160b814e67da7652007e2693714895221ea0","size":19595,"noattachment":false,"key":"/expr-eval/-/expr-eval-1.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/expr-eval/download/expr-eval-1.2.2.tgz"},"maintainers":[{"name":"silentmatt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expr-eval_1.2.2_1530629734568_0.5636936246992217"},"_hasShrinkwrap":false,"publish_time":1530629734665,"_cnpm_publish_time":1530629734665,"_cnpmcore_publish_time":"2021-12-16T14:17:44.692Z"},"1.2.1":{"name":"expr-eval","version":"1.2.1","description":"Mathematical expression evaluator","main":"dist/bundle.js","typings":"parser.d.ts","directories":{"test":"test"},"dependencies":{},"devDependencies":{"eslint":"^4.5.0","eslint-config-semistandard":"^11.0.0","eslint-config-standard":"^10.2.1","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.1.1","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^3.0.1","istanbul":"^0.4.5","mocha":"^3.5.0","rollup":"^0.50.0","rollup-plugin-uglify":"^2.0.1"},"scripts":{"test":"npm run build && mocha","coverage":"npm run build && istanbul cover _mocha","lint":"eslint index.js src test rollup.config.js rollup-min.config.js","build":"rollup -c rollup.config.js && rollup -c rollup-min.config.js","prepublish":"npm run build"},"files":["dist/","parser.d.ts"],"repository":{"type":"git","url":"git+https://github.com/silentmatt/expr-eval.git"},"keywords":["expression","math","evaluate","eval","function","parser"],"author":{"name":"Matthew Crumley"},"license":"MIT","bugs":{"url":"https://github.com/silentmatt/expr-eval/issues"},"homepage":"https://github.com/silentmatt/expr-eval#readme","gitHead":"ffecd28c13fb9e3e502f1d07fbfbb5f85acd1d5b","_id":"expr-eval@1.2.1","_shasum":"1425caf4d7ccb7439ce72d0488b20c3f6e4ea25a","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.2.6","_npmUser":{"name":"silentmatt","email":"email@matthewcrumley.com"},"dist":{"shasum":"1425caf4d7ccb7439ce72d0488b20c3f6e4ea25a","size":19242,"noattachment":false,"key":"/expr-eval/-/expr-eval-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/expr-eval/download/expr-eval-1.2.1.tgz"},"maintainers":[{"name":"silentmatt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expr-eval-1.2.1.tgz_1513892541307_0.6143889264203608"},"publish_time":1513892542282,"_hasShrinkwrap":false,"_cnpm_publish_time":1513892542282,"_cnpmcore_publish_time":"2021-12-16T14:17:44.991Z"},"1.2.0":{"name":"expr-eval","version":"1.2.0","description":"Mathematical expression evaluator","main":"dist/bundle.js","typings":"parser.d.ts","directories":{"test":"test"},"dependencies":{},"devDependencies":{"eslint":"^4.5.0","eslint-config-semistandard":"^11.0.0","eslint-config-standard":"^10.2.1","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.1.1","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^3.0.1","istanbul":"^0.4.5","mocha":"^3.5.0","rollup":"^0.50.0","rollup-plugin-uglify":"^2.0.1"},"scripts":{"test":"npm run build && mocha","coverage":"npm run build && istanbul cover _mocha","lint":"eslint index.js src test rollup.config.js rollup-min.config.js","build":"rollup -c rollup.config.js && rollup -c rollup-min.config.js","prepublish":"npm run build"},"files":["dist/"],"repository":{"type":"git","url":"git+https://github.com/silentmatt/expr-eval.git"},"keywords":["expression","math","evaluate","eval","function","parser"],"author":{"name":"Matthew Crumley"},"license":"MIT","bugs":{"url":"https://github.com/silentmatt/expr-eval/issues"},"homepage":"https://github.com/silentmatt/expr-eval#readme","gitHead":"d5cabd941eed44a229269859d795387a190628d3","_id":"expr-eval@1.2.0","_shasum":"9a9d7f6ba8d958d441df5a874a0eb9522fb10a7a","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.2.6","_npmUser":{"name":"silentmatt","email":"email@matthewcrumley.com"},"dist":{"shasum":"9a9d7f6ba8d958d441df5a874a0eb9522fb10a7a","size":18805,"noattachment":false,"key":"/expr-eval/-/expr-eval-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/expr-eval/download/expr-eval-1.2.0.tgz"},"maintainers":[{"name":"silentmatt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expr-eval-1.2.0.tgz_1506364386237_0.37146755028516054"},"publish_time":1506364387523,"_hasShrinkwrap":false,"_cnpm_publish_time":1506364387523,"_cnpmcore_publish_time":"2021-12-16T14:17:45.245Z"},"1.1.1":{"name":"expr-eval","version":"1.1.1","description":"Mathematical expression evaluator","main":"dist/bundle.js","typings":"parser.d.ts","directories":{"test":"test"},"dependencies":{},"devDependencies":{"chai":"^4.1.1","eslint":"^4.5.0","eslint-config-semistandard":"^11.0.0","eslint-config-standard":"^10.2.1","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.1.1","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^3.0.1","istanbul":"^0.4.5","mocha":"^3.5.0","rollup":"^0.49.2","rollup-plugin-uglify":"^2.0.1"},"scripts":{"test":"npm run build && mocha","coverage":"npm run build && istanbul cover _mocha","lint":"eslint index.js src test rollup.config.js rollup-min.config.js","build":"rollup -c rollup.config.js && rollup -c rollup-min.config.js","prepublish":"npm run build"},"files":["dist/"],"repository":{"type":"git","url":"git+https://github.com/silentmatt/expr-eval.git"},"keywords":["expression","math","evaluate","eval","function","parser"],"author":{"name":"Matthew Crumley"},"license":"MIT","bugs":{"url":"https://github.com/silentmatt/expr-eval/issues"},"homepage":"https://github.com/silentmatt/expr-eval#readme","gitHead":"d7f8884c1ae81f39b4b73cbbd3f27aed8d305a23","_id":"expr-eval@1.1.1","_shasum":"c7ffd7c7194cda3baf369591f4e8d4f7f9c0a0f0","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.2.6","_npmUser":{"name":"silentmatt","email":"email@matthewcrumley.com"},"dist":{"shasum":"c7ffd7c7194cda3baf369591f4e8d4f7f9c0a0f0","size":18350,"noattachment":false,"key":"/expr-eval/-/expr-eval-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/expr-eval/download/expr-eval-1.1.1.tgz"},"maintainers":[{"name":"silentmatt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expr-eval-1.1.1.tgz_1504719829924_0.8651555108372122"},"publish_time":1504719831210,"_hasShrinkwrap":false,"_cnpm_publish_time":1504719831210,"_cnpmcore_publish_time":"2021-12-16T14:17:45.507Z"},"1.1.0":{"name":"expr-eval","version":"1.1.0","description":"Mathematical expression evaluator","main":"dist/bundle.js","typings":"parser.d.ts","directories":{"test":"test"},"dependencies":{},"devDependencies":{"chai":"^4.1.1","eslint":"^4.5.0","eslint-config-semistandard":"^11.0.0","eslint-config-standard":"^10.2.1","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.1.1","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^3.0.1","istanbul":"^0.4.5","mocha":"^3.5.0","rollup":"^0.49.2","rollup-plugin-uglify":"^2.0.1"},"scripts":{"test":"npm run build && mocha","coverage":"npm run build && istanbul cover _mocha","lint":"eslint index.js src test rollup.config.js rollup-min.config.js","build":"rollup -c rollup.config.js && rollup -c rollup-min.config.js","prepublish":"npm run build"},"files":["dist/"],"repository":{"type":"git","url":"git+https://github.com/silentmatt/expr-eval.git"},"keywords":["expression","math","evaluate","eval","function","parser"],"author":{"name":"Matthew Crumley"},"license":"MIT","bugs":{"url":"https://github.com/silentmatt/expr-eval/issues"},"homepage":"https://github.com/silentmatt/expr-eval#readme","gitHead":"3c3fe07bfe33e371a259626ce8366b4e22a61f38","_id":"expr-eval@1.1.0","_shasum":"8ce6f7c0ff4ee559c375d903a12bb564f77c0278","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.2","_npmUser":{"name":"silentmatt","email":"email@matthewcrumley.com"},"dist":{"shasum":"8ce6f7c0ff4ee559c375d903a12bb564f77c0278","size":18346,"noattachment":false,"key":"/expr-eval/-/expr-eval-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/expr-eval/download/expr-eval-1.1.0.tgz"},"maintainers":[{"name":"silentmatt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expr-eval-1.1.0.tgz_1504058937892_0.885403414722532"},"publish_time":1504058938995,"_hasShrinkwrap":false,"_cnpm_publish_time":1504058938995,"_cnpmcore_publish_time":"2021-12-16T14:17:45.772Z"},"1.0.1":{"name":"expr-eval","version":"1.0.1","description":"Mathematical expression evaluator","main":"dist/bundle.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"chai":"^3.5.0","eslint":"^3.4.0","eslint-config-semistandard":"^7.0.0-beta.0","eslint-config-standard":"^6.0.0","eslint-plugin-promise":"^3.3.1","eslint-plugin-standard":"^2.0.0","istanbul":"^0.4.5","mocha":"^3.1.0","rollup":"^0.36.0","rollup-plugin-uglify":"^1.0.1"},"scripts":{"test":"npm run build && mocha","coverage":"npm run build && istanbul cover _mocha","lint":"eslint parser.js test rollup.config.js rollup-min.config.js","build":"rollup -c rollup.config.js && rollup -c rollup-min.config.js","prepublish":"npm run build"},"files":["dist/"],"repository":{"type":"git","url":"git+https://github.com/silentmatt/expr-eval.git"},"keywords":["expression","math","evaluate","eval","function","parser"],"author":{"name":"Matthew Crumley"},"license":"MIT","bugs":{"url":"https://github.com/silentmatt/expr-eval/issues"},"homepage":"https://github.com/silentmatt/expr-eval#readme","gitHead":"b7d35ecebe8fe134d40dc07bed4805578985dcac","_id":"expr-eval@1.0.1","_shasum":"ba6b4296617dc3535046cf82f5d01fb3e474b163","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"silentmatt","email":"email@matthewcrumley.com"},"dist":{"shasum":"ba6b4296617dc3535046cf82f5d01fb3e474b163","size":16977,"noattachment":false,"key":"/expr-eval/-/expr-eval-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/expr-eval/download/expr-eval-1.0.1.tgz"},"maintainers":[{"name":"silentmatt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expr-eval-1.0.1.tgz_1497135667014_0.6566164984833449"},"publish_time":1497135668863,"_hasShrinkwrap":false,"_cnpm_publish_time":1497135668863,"_cnpmcore_publish_time":"2021-12-16T14:17:46.036Z"},"1.0.0":{"name":"expr-eval","version":"1.0.0","description":"Mathematical expression evaluator","main":"dist/bundle.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"chai":"^3.5.0","eslint":"^3.4.0","eslint-config-semistandard":"^7.0.0-beta.0","eslint-config-standard":"^6.0.0","eslint-plugin-promise":"^3.3.1","eslint-plugin-standard":"^2.0.0","istanbul":"^0.4.5","mocha":"^3.1.0","rollup":"^0.36.0","rollup-plugin-uglify":"^1.0.1"},"scripts":{"test":"npm run build && mocha","coverage":"npm run build && istanbul cover _mocha","lint":"eslint parser.js test rollup.config.js rollup-min.config.js","build":"rollup -c rollup.config.js && rollup -c rollup-min.config.js","prepublish":"npm run build"},"files":["dist/"],"repository":{"type":"git","url":"git+https://github.com/silentmatt/expr-eval.git"},"keywords":["expression","math","evaluate","eval","function","parser"],"author":{"name":"Matthew Crumley"},"license":"MIT","bugs":{"url":"https://github.com/silentmatt/expr-eval/issues"},"homepage":"https://github.com/silentmatt/expr-eval#readme","gitHead":"fb3b840b409e3db6f7e9335a6431a1338a1fca5e","_id":"expr-eval@1.0.0","_shasum":"0a5ef2cd7d0d745c3a490d2cf53bca3400b2965d","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"silentmatt","email":"email@matthewcrumley.com"},"dist":{"shasum":"0a5ef2cd7d0d745c3a490d2cf53bca3400b2965d","size":17103,"noattachment":false,"key":"/expr-eval/-/expr-eval-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/expr-eval/download/expr-eval-1.0.0.tgz"},"maintainers":[{"name":"silentmatt","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/expr-eval-1.0.0.tgz_1483386831169_0.6428212849423289"},"publish_time":1483386831868,"_hasShrinkwrap":false,"_cnpm_publish_time":1483386831868,"_cnpmcore_publish_time":"2021-12-16T14:17:46.274Z"},"1.0.0-rc.4":{"name":"expr-eval","version":"1.0.0-rc.4","description":"Mathematical expression evaluator","main":"dist/bundle.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"chai":"^3.5.0","eslint":"^3.4.0","eslint-config-semistandard":"^7.0.0-beta.0","eslint-config-standard":"^6.0.0","eslint-plugin-promise":"^3.3.1","eslint-plugin-standard":"^2.0.0","istanbul":"^0.4.5","mocha":"^3.1.0","rollup":"^0.36.0","rollup-plugin-uglify":"^1.0.1"},"scripts":{"test":"npm run build && mocha","coverage":"npm run build && istanbul cover _mocha","lint":"eslint parser.js test rollup.config.js rollup-min.config.js","build":"rollup -c rollup.config.js && rollup -c rollup-min.config.js","prepublish":"npm run build"},"files":["dist/"],"repository":{"type":"git","url":"git+https://github.com/silentmatt/expr-eval.git"},"keywords":["expression","math","evaluate","eval","function","parser"],"author":{"name":"Matthew Crumley"},"license":"MIT","bugs":{"url":"https://github.com/silentmatt/expr-eval/issues"},"homepage":"https://github.com/silentmatt/expr-eval#readme","gitHead":"e765b0d170512b8c0289c8dae09227969c9ee1f4","_id":"expr-eval@1.0.0-rc.4","_shasum":"0d74752fbe65a24481c0d1cce7e6cdfa6d4e4101","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.2.6","_npmUser":{"name":"silentmatt","email":"email@matthewcrumley.com"},"dist":{"shasum":"0d74752fbe65a24481c0d1cce7e6cdfa6d4e4101","size":17093,"noattachment":false,"key":"/expr-eval/-/expr-eval-1.0.0-rc.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/expr-eval/download/expr-eval-1.0.0-rc.4.tgz"},"maintainers":[{"name":"silentmatt","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/expr-eval-1.0.0-rc.4.tgz_1483036227211_0.7925026642624289"},"publish_time":1483036227905,"_hasShrinkwrap":false,"_cnpm_publish_time":1483036227905,"_cnpmcore_publish_time":"2021-12-16T14:17:46.566Z"},"1.0.0-rc.3":{"name":"expr-eval","version":"1.0.0-rc.3","description":"Mathematical expression evaluator","main":"dist/bundle.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"chai":"^3.5.0","eslint":"^3.4.0","eslint-config-semistandard":"^7.0.0-beta.0","eslint-config-standard":"^6.0.0","eslint-plugin-promise":"^3.3.1","eslint-plugin-standard":"^2.0.0","istanbul":"^0.4.5","mocha":"^3.1.0","rollup":"^0.36.0","rollup-plugin-uglify":"^1.0.1"},"scripts":{"test":"npm run build && mocha","coverage":"npm run build && istanbul cover _mocha","lint":"eslint parser.js test rollup.config.js rollup-min.config.js","build":"rollup -c rollup.config.js && rollup -c rollup-min.config.js","prepublish":"npm run build"},"files":["dist/"],"repository":{"type":"git","url":"git+https://github.com/silentmatt/expr-eval.git"},"keywords":["expression","math","evaluate","eval","function","parser"],"author":{"name":"Matthew Crumley"},"license":"MIT","bugs":{"url":"https://github.com/silentmatt/expr-eval/issues"},"homepage":"https://github.com/silentmatt/expr-eval#readme","gitHead":"513c2cadf650c81ca41f49124a0dfea7f71b77e6","_id":"expr-eval@1.0.0-rc.3","_shasum":"846a82bc187bb95063f55d22ef0b3de142697bb8","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.2.6","_npmUser":{"name":"silentmatt","email":"email@matthewcrumley.com"},"dist":{"shasum":"846a82bc187bb95063f55d22ef0b3de142697bb8","size":17375,"noattachment":false,"key":"/expr-eval/-/expr-eval-1.0.0-rc.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/expr-eval/download/expr-eval-1.0.0-rc.3.tgz"},"maintainers":[{"name":"silentmatt","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/expr-eval-1.0.0-rc.3.tgz_1480366004650_0.6059744502417743"},"publish_time":1480366005344,"_hasShrinkwrap":false,"_cnpm_publish_time":1480366005344,"_cnpmcore_publish_time":"2021-12-16T14:17:46.798Z"},"0.12.0":{"name":"expr-eval","version":"0.12.0","description":"Mathematical expression evaluator","main":"dist/bundle.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"chai":"^3.5.0","eslint":"^3.4.0","eslint-config-semistandard":"^7.0.0-beta.0","eslint-config-standard":"^6.0.0","eslint-plugin-promise":"^2.0.1","eslint-plugin-standard":"^2.0.0","istanbul":"^0.4.5","mocha":"^3.1.0","rollup":"^0.36.0"},"scripts":{"test":"npm run build && mocha","coverage":"npm run build && istanbul cover _mocha","lint":"eslint parser.js test","build":"rollup parser.js --format=umd --name=exprEval --output=dist/bundle.js","prepublish":"npm run build"},"files":["dist/"],"repository":{"type":"git","url":"git+https://github.com/silentmatt/expr-eval.git"},"keywords":["expression","math","evaluate","eval","function","parser"],"author":{"name":"Matthew Crumley"},"license":"MIT","bugs":{"url":"https://github.com/silentmatt/expr-eval/issues"},"homepage":"https://github.com/silentmatt/expr-eval#readme","gitHead":"92ed7405cae44a1cf839ee9437a3444c818d91b6","_id":"expr-eval@0.12.0","_shasum":"129ed36e73bf86e04786952fc746ba63b58e2e6b","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.2.6","_npmUser":{"name":"silentmatt","email":"email@matthewcrumley.com"},"dist":{"shasum":"129ed36e73bf86e04786952fc746ba63b58e2e6b","size":11362,"noattachment":false,"key":"/expr-eval/-/expr-eval-0.12.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/expr-eval/download/expr-eval-0.12.0.tgz"},"maintainers":[{"name":"silentmatt","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/expr-eval-0.12.0.tgz_1476337411445_0.6743396252859384"},"publish_time":1476337413534,"_hasShrinkwrap":false,"_cnpm_publish_time":1476337413534,"_cnpmcore_publish_time":"2021-12-16T14:17:47.038Z"},"0.10.1":{"name":"expr-eval","version":"0.10.1","description":"Mathematical expression evaluator","main":"dist/bundle.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"chai":"^3.5.0","eslint":"^3.4.0","eslint-config-semistandard":"^7.0.0-beta.0","eslint-config-standard":"^6.0.0","eslint-plugin-promise":"^2.0.1","eslint-plugin-standard":"^2.0.0","mocha":"^2.5.3","rollup":"^0.36.0"},"scripts":{"test":"npm run build && mocha","lint":"eslint parser.js test","build":"rollup parser.js --format=umd --name=exprEval --output=dist/bundle.js","prepublish":"npm run build"},"files":["dist/"],"repository":{"type":"git","url":"git+https://github.com/silentmatt/expr-eval.git"},"keywords":["expression","math","evaluate","eval","function","parser"],"author":{"name":"Matthew Crumley"},"license":"MIT","bugs":{"url":"https://github.com/silentmatt/expr-eval/issues"},"homepage":"https://github.com/silentmatt/expr-eval#readme","gitHead":"7297a56fd2b1e49df8a5bd1492b982648b8f7b19","_id":"expr-eval@0.10.1","_shasum":"c009aee50bdc807f3d4437575b99a7761a8f723a","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.2.6","_npmUser":{"name":"silentmatt","email":"email@matthewcrumley.com"},"dist":{"shasum":"c009aee50bdc807f3d4437575b99a7761a8f723a","size":10882,"noattachment":false,"key":"/expr-eval/-/expr-eval-0.10.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/expr-eval/download/expr-eval-0.10.1.tgz"},"maintainers":[{"name":"silentmatt","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/expr-eval-0.10.1.tgz_1475443450408_0.7988066470716149"},"publish_time":1475443452519,"_hasShrinkwrap":false,"_cnpm_publish_time":1475443452519,"_cnpmcore_publish_time":"2021-12-16T14:17:47.271Z"},"0.10.0":{"name":"expr-eval","version":"0.10.0","description":"Mathematical expression evaluator","main":"dist/bundle.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"chai":"^3.5.0","eslint":"^3.4.0","eslint-config-semistandard":"^7.0.0-beta.0","eslint-config-standard":"^6.0.0","eslint-plugin-promise":"^2.0.1","eslint-plugin-standard":"^2.0.0","mocha":"^2.5.3","rollup":"^0.36.0"},"scripts":{"test":"npm run build && mocha","lint":"eslint parser.js test","build":"rollup parser.js --format=umd --name=exprEval --output=dist/bundle.js","prepublish":"npm run build"},"files":["dist/"],"repository":{"type":"git","url":"git+https://github.com/silentmatt/expr-eval.git"},"keywords":["expression","math","evaluate","eval","function","parser"],"author":{"name":"Matthew Crumley"},"license":"MIT","bugs":{"url":"https://github.com/silentmatt/expr-eval/issues"},"homepage":"https://github.com/silentmatt/expr-eval#readme","gitHead":"416853f3fd8be5419bf1ecdaffbd6633d40576a8","_id":"expr-eval@0.10.0","_shasum":"0be791d709c18f903d43036867157c5cee2d6c39","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.2.6","_npmUser":{"name":"silentmatt","email":"email@matthewcrumley.com"},"dist":{"shasum":"0be791d709c18f903d43036867157c5cee2d6c39","size":11001,"noattachment":false,"key":"/expr-eval/-/expr-eval-0.10.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/expr-eval/download/expr-eval-0.10.0.tgz"},"maintainers":[{"name":"silentmatt","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/expr-eval-0.10.0.tgz_1475124798523_0.9397801468148828"},"publish_time":1475124799367,"_hasShrinkwrap":false,"_cnpm_publish_time":1475124799367,"_cnpmcore_publish_time":"2021-12-16T14:17:47.468Z"},"0.9.0":{"name":"expr-eval","version":"0.9.0","description":"Mathematical expression evaluator","main":"parser.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"chai":"^3.5.0","eslint":"^3.4.0","eslint-config-semistandard":"^7.0.0-beta.0","eslint-config-standard":"^6.0.0","eslint-plugin-promise":"^2.0.1","eslint-plugin-standard":"^2.0.0","mocha":"^2.5.3"},"scripts":{"test":"mocha","lint":"eslint ."},"repository":{"type":"git","url":"git+https://github.com/silentmatt/expr-eval.git"},"keywords":["expression","math","evaluate","eval","function","parser"],"author":{"name":"Matthew Crumley"},"license":"MIT","bugs":{"url":"https://github.com/silentmatt/expr-eval/issues"},"homepage":"https://github.com/silentmatt/expr-eval#readme","gitHead":"58d6cecef068e8222a33df948a2088e7a016e2a3","_id":"expr-eval@0.9.0","_shasum":"4a2a38d147a1934e9a0391bec422721b4582d514","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.2.6","_npmUser":{"name":"silentmatt","email":"email@matthewcrumley.com"},"dist":{"shasum":"4a2a38d147a1934e9a0391bec422721b4582d514","size":11689,"noattachment":false,"key":"/expr-eval/-/expr-eval-0.9.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/expr-eval/download/expr-eval-0.9.0.tgz"},"maintainers":[{"name":"silentmatt","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/expr-eval-0.9.0.tgz_1473824043442_0.3888529217801988"},"publish_time":1473824044382,"_hasShrinkwrap":false,"_cnpm_publish_time":1473824044382,"_cnpmcore_publish_time":"2021-12-16T14:17:47.679Z"}},"readme":"JavaScript Expression Evaluator\n===============================\n\n[![npm](https://img.shields.io/npm/v/expr-eval.svg?maxAge=3600)](https://www.npmjs.com/package/expr-eval)\n[![CDNJS version](https://img.shields.io/cdnjs/v/expr-eval.svg?maxAge=3600)](https://cdnjs.com/libraries/expr-eval)\n[![Build Status](https://travis-ci.org/silentmatt/expr-eval.svg?branch=master)](https://travis-ci.org/silentmatt/expr-eval)\n\nDescription\n-------------------------------------\n\nParses and evaluates mathematical expressions. It's a safer and more\nmath-oriented alternative to using JavaScript’s `eval` function for mathematical\nexpressions.\n\nIt has built-in support for common math operators and functions. Additionally,\nyou can add your own JavaScript functions. Expressions can be evaluated\ndirectly, or compiled into native JavaScript functions.\n\nInstallation\n-------------------------------------\n\n    npm install expr-eval\n\nBasic Usage\n-------------------------------------\n\n    var Parser = require('expr-eval').Parser;\n\n    var parser = new Parser();\n    var expr = parser.parse('2 * x + 1');\n    console.log(expr.evaluate({ x: 3 })); // 7\n\n    // or\n    Parser.evaluate('6 * x', { x: 7 }) // 42\n\nDocumentation\n-------------------------------------\n\n* [Parser](#parser)\n    - [Parser()](#parser-1)\n    - [parse(expression: string)](#parseexpression-string)\n    - [Parser.parse(expression: string)](#parserparseexpression-string)\n    - [Parser.evaluate(expression: string, variables?: object)](#parserevaluateexpression-string-variables-object)\n* [Expression](#expression)\n    - [evaluate(variables?: object)](#evaluatevariables-object)\n    - [substitute(variable: string, expression: Expression | string | number)](#substitutevariable-string-expression-expression--string--number)\n    - [simplify(variables: object)](#simplifyvariables-object)\n    - [variables(options?: object)](#variablesoptions-object)\n    - [symbols(options?: object)](#symbolsoptions-object)\n    - [toString()](#tostring)\n    - [toJSFunction(parameters: array | string, variables?: object)](#tojsfunctionparameters-array--string-variables-object)\n* [Expression Syntax](#expression-syntax)\n    - [Operator Precedence](#operator-precedence)\n    - [Unary operators](#unary-operators)\n    - [Array literals](#array-literals)\n    - [Pre-defined functions](#pre-defined-functions)\n    - [Custom JavaScript functions](#custom-javascript-functions)\n    - [Constants](#constants)\n\n### Parser ###\n\nParser is the main class in the library. It has as single `parse` method, and\n\"static\" methods for parsing and evaluating expressions.\n\n#### Parser()\n\nConstructs a new `Parser` instance.\n\nThe constructor takes an optional `options` parameter that allows you to enable or disable operators.\n\nFor example, the following will create a `Parser` that does not allow comparison or logical operators, but does allow `in`:\n\n    var parser = new Parser({\n      operators: {\n        // These default to true, but are included to be explicit\n        add: true,\n        concatenate: true,\n        conditional: true,\n        divide: true,\n        factorial: true,\n        multiply: true,\n        power: true,\n        remainder: true,\n        subtract: true,\n\n        // Disable and, or, not, <, ==, !=, etc.\n        logical: false,\n        comparison: false,\n\n        // Disable 'in' and = operators\n        'in': false,\n        assignment: false\n      }\n    });\n\n#### parse(expression: string)\n\nConvert a mathematical expression into an `Expression` object.\n\n#### Parser.parse(expression: string)\n\nStatic equivalent of `new Parser().parse(expression)`.\n\n#### Parser.evaluate(expression: string, variables?: object)\n\nParse and immediately evaluate an expression using the values and functions from\nthe `variables` object.\n\nParser.evaluate(expr, vars) is equivalent to calling\nParser.parse(expr).evaluate(vars).\n\n### Expression ###\n\n`Parser.parse(str)` returns an `Expression` object. `Expression`s are similar to\nJavaScript functions, i.e. they can be \"called\" with variables bound to\npassed-in values. In fact, they can even be converted into JavaScript\nfunctions.\n\n#### evaluate(variables?: object)\n\nEvaluate the expression, with variables bound to the values in {variables}. Each\nvariable in the expression is bound to the corresponding member of the\n`variables` object. If there are unbound variables, `evaluate` will throw an\nexception.\n\n    js> expr = Parser.parse(\"2 ^ x\");\n    (2^x)\n    js> expr.evaluate({ x: 3 });\n    8\n\n#### substitute(variable: string, expression: Expression | string | number)\n\nCreate a new `Expression` with the specified variable replaced with another\nexpression. This is similar to function composition. If `expression` is a string\nor number, it will be parsed into an `Expression`.\n\n    js> expr = Parser.parse(\"2 * x + 1\");\n    ((2*x)+1)\n    js> expr.substitute(\"x\", \"4 * x\");\n    ((2*(4*x))+1)\n    js> expr2.evaluate({ x: 3 });\n    25\n\n#### simplify(variables: object)\n\nSimplify constant sub-expressions and replace variable references with literal\nvalues. This is basically a partial evaluation, that does as much of the\ncalculation as it can with the provided variables. Function calls are not\nevaluated (except the built-in operator functions), since they may not be\ndeterministic.\n\nSimplify is pretty simple. For example, it doesn’t know that addition and\nmultiplication are associative, so `((2*(4*x))+1)` from the previous example\ncannot be simplified unless you provide a value for x. `2*4*x+1` can however,\nbecause it’s parsed as `(((2*4)*x)+1)`, so the `(2*4)` sub-expression will be\nreplaced with \"8\", resulting in `((8*x)+1)`.\n\n    js> expr = Parser.parse(\"x * (y * atan(1))\").simplify({ y: 4 });\n    (x*3.141592653589793)\n    js> expr.evaluate({ x: 2 });\n    6.283185307179586\n\n#### variables(options?: object)\n\nGet an array of the unbound variables in the expression.\n\n    js> expr = Parser.parse(\"x * (y * atan(1))\");\n    (x*(y*atan(1)))\n    js> expr.variables();\n    x,y\n    js> expr.simplify({ y: 4 }).variables();\n    x\n\nBy default, `variables` will return \"top-level\" objects, so for example, `Parser.parse(x.y.z).variables()` returns `['x']`. If you want to get the whole chain of object members, you can call it with `{ withMembers: true }`. So `Parser.parse(x.y.z).variables({ withMembers: true })` would return `['x.y.z']`.\n\n#### symbols(options?: object)\n\nGet an array of variables, including any built-in functions used in the\nexpression.\n\n    js> expr = Parser.parse(\"min(x, y, z)\");\n    (min(x, y, z))\n    js> expr.symbols();\n    min,x,y,z\n    js> expr.simplify({ y: 4, z: 5 }).symbols();\n    min,x\n\nLike `variables`, `symbols` accepts an option argument `{ withMembers: true }` to include object members.\n\n#### toString()\n\nConvert the expression to a string. `toString()` surrounds every sub-expression\nwith parentheses (except literal values, variables, and function calls), so\nit’s useful for debugging precedence errors.\n\n#### toJSFunction(parameters: array | string, variables?: object)\n\nConvert an `Expression` object into a callable JavaScript function. `parameters`\nis an array of parameter names, or a string, with the names separated by commas.\n\nIf the optional `variables` argument is provided, the expression will be\nsimplified with variables bound to the supplied values.\n\n    js> expr = Parser.parse(\"x + y + z\");\n    ((x + y) + z)\n    js> f = expr.toJSFunction(\"x,y,z\");\n    [Function] // function (x, y, z) { return x + y + z; };\n    js> f(1, 2, 3)\n    6\n    js> f = expr.toJSFunction(\"y,z\", { x: 100 });\n    [Function] // function (y, z) { return 100 + y + z; };\n    js> f(2, 3)\n    105\n\n### Expression Syntax ###\n\nThe parser accepts a pretty basic grammar. It's similar to normal JavaScript\nexpressions, but is more math-oriented. For example, the `^` operator is\nexponentiation, not xor.\n\n#### Operator Precedence\n\nOperator                 | Associativity | Description\n:----------------------- | :------------ | :----------\n(...)                    | None          | Grouping\nf(), x.y, a[i]           | Left          | Function call, property access, array indexing\n!                        | Left          | Factorial\n^                        | Right         | Exponentiation\n+, -, not, sqrt, etc.    | Right         | Unary prefix operators (see below for the full list)\n\\*, /, %                 | Left          | Multiplication, division, remainder\n+, -, \\|\\|               | Left          | Addition, subtraction, array/list concatenation\n==, !=, >=, <=, >, <, in | Left          | Equals, not equals, etc. \"in\" means \"is the left operand included in the right array operand?\"\nand                      | Left          | Logical AND\nor                       | Left          | Logical OR\nx ? y : z                | Right         | Ternary conditional (if x then y else z)\n=                        | Right         | Variable assignment\n;                        | Left          | Expression separator\n\n    var parser = new Parser({\n      operators: {\n        'in': true,\n        'assignment': true\n      }\n    });\n    // Now parser supports 'x in array' and 'y = 2*x' expressions\n\n#### Unary operators\n\nThe parser has several built-in \"functions\" that are actually unary operators.\nThe primary difference between these and functions are that they can only accept\nexactly one argument, and parentheses are optional. With parentheses, they have\nthe same precedence as function calls, but without parentheses, they keep their\nnormal precedence (just below `^`). For example, `sin(x)^2` is equivalent to\n`(sin x)^2`, and `sin x^2` is equivalent to `sin(x^2)`.\n\nThe unary `+` and `-` operators are an exception, and always have their normal\nprecedence.\n\nOperator | Description\n:------- | :----------\n-x       | Negation\n+x       | Unary plus. This converts it's operand to a number, but has no other effect.\nx!       | Factorial (x * (x-1) * (x-2) * … * 2 * 1). gamma(x + 1) for non-integers.\nabs x    | Absolute value (magnitude) of x\nacos x   | Arc cosine of x (in radians)\nacosh x  | Hyperbolic arc cosine of x (in radians)\nasin x   | Arc sine of x (in radians)\nasinh x  | Hyperbolic arc sine of x (in radians)\natan x   | Arc tangent of x (in radians)\natanh x  | Hyperbolic arc tangent of x (in radians)\ncbrt x   | Cube root of x\nceil x   | Ceiling of x — the smallest integer that’s >= x\ncos x    | Cosine of x (x is in radians)\ncosh x   | Hyperbolic cosine of x (x is in radians)\nexp x    | e^x (exponential/antilogarithm function with base e)\nexpm1 x  | e^x - 1\nfloor x  | Floor of x — the largest integer that’s <= x\nlength x | String length of x\nln x     | Natural logarithm of x\nlog x    | Natural logarithm of x (synonym for ln, not base-10)\nlog10 x  | Base-10 logarithm of x\nlog2 x   | Base-2 logarithm of x\nlog1p x  | Natural logarithm of (1 + x)\nnot x    | Logical NOT operator\nround x  | X, rounded to the nearest integer, using \"grade-school rounding\"\nsign x   | Sign of x (-1, 0, or 1 for negative, zero, or positive respectively)\nsin x    | Sine of x (x is in radians)\nsinh x   | Hyperbolic sine of x (x is in radians)\nsqrt x   | Square root of x. Result is NaN (Not a Number) if x is negative.\ntan x    | Tangent of x (x is in radians)\ntanh x   | Hyperbolic tangent of x (x is in radians)\ntrunc x  | Integral part of a X, looks like floor(x) unless for negative number\n\n#### Pre-defined functions\n\nBesides the \"operator\" functions, there are several pre-defined functions. You\ncan provide your own, by binding variables to normal JavaScript functions.\nThese are not evaluated by simplify.\n\nFunction      | Description\n:------------ | :----------\nrandom(n)     | Get a random number in the range [0, n). If n is zero, or not provided, it defaults to 1.\nfac(n)        | n! (factorial of n: \"n * (n-1) * (n-2) * … * 2 * 1\") Deprecated. Use the ! operator instead.\nmin(a,b,…)    | Get the smallest (minimum) number in the list.\nmax(a,b,…)    | Get the largest (maximum) number in the list.\nhypot(a,b)    | Hypotenuse, i.e. the square root of the sum of squares of its arguments.\npyt(a, b)     | Alias for hypot.\npow(x, y)     | Equivalent to x^y. For consistency with JavaScript's Math object.\natan2(y, x)   | Arc tangent of x/y. i.e. the angle between (0, 0) and (x, y) in radians.\nroundTo(x, n) | Rounds x to n places after the decimal point.\nmap(f, a)     | Array map: Pass each element of `a` the function `f`, and return an array of the results.\nfold(f, y, a) | Array fold: Fold/reduce array `a` into a single value, `y` by setting `y = f(y, x, index)` for each element `x` of the array.\nfilter(f, a)  | Array filter: Return an array containing only the values from `a` where `f(x, index)` is `true`.\nindexOf(x, a) | Return the first index of string or array `a` matching the value `x`, or `-1` if not found.\njoin(sep, a)  | Concatenate the elements of `a`, separated by `sep`.\nif(c, a, b)   | Function form of c ? a : b. Note: This always evaluates both `a` and `b`, regardless of whether `c` is `true` or not. Use `c ? a : b` instead if there are side effects, or if evaluating the branches could be expensive.\n\n#### Array literals\n\nArrays can be created by including the elements inside square `[]` brackets, separated by commas. For example:\n\n    [ 1, 2, 3, 2+2, 10/2, 3! ]\n\n#### Function definitions\n\nYou can define functions using the syntax `name(params) = expression`. When it's evaluated, the name will be added to the passed in scope as a function. You can call it later in the expression, or make it available to other expressions by re-using the same scope object. Functions can support multiple parameters, separated by commas.\n\nExamples:\n\n    square(x) = x*x\n    add(a, b) = a + b\n    factorial(x) = x < 2 ? 1 : x * factorial(x - 1)\n\n#### Custom JavaScript functions\n\nIf you need additional functions that aren't supported out of the box, you can easily add them in your own code. Instances of the `Parser` class have a property called `functions` that's simply an object with all the functions that are in scope. You can add, replace, or delete any of the properties to customize what's available in the expressions. For example:\n\n    var parser = new Parser();\n\n    // Add a new function\n    parser.functions.customAddFunction = function (arg1, arg2) {\n      return arg1 + arg2;\n    };\n\n    // Remove the factorial function\n    delete parser.functions.fac;\n\n    parser.evaluate('customAddFunction(2, 4) == 6'); // true\n    //parser.evaluate('fac(3)'); // This will fail\n\n#### Constants\n\nThe parser also includes a number of pre-defined constants that can be used in expressions. These are shown\nin the table below:\n\nConstant     | Description\n:----------- | :----------\nE            | The value of `Math.E` from your JavaScript runtime\nPI           | The value of `Math.PI` from your JavaScript runtime\ntrue         | Logical `true` value\nfalse        | Logical `false` value\n\nPre-defined constants are stored in `parser.consts`. You can make changes to this property to customise the\nconstants available to your expressions. For example:\n\n    var parser = new Parser();\n    parser.consts.R = 1.234;\n\n    console.log(parser.parse('A+B/R').toString());  // ((A + B) / 1.234)\n\nTo disable the pre-defined constants, you can replace or delete `parser.consts`:\n\n    var parser = new Parser();\n    parser.consts = {};\n\n\n### Tests ###\n\n1. `cd` to the project directory\n2. Install development dependencies: `npm install`\n3. Run the tests: `npm test`\n","_attachments":{},"homepage":"https://github.com/silentmatt/expr-eval#readme","bugs":{"url":"https://github.com/silentmatt/expr-eval/issues"},"license":"MIT"}