{"_id":"math-codegen","_rev":"23-c48f8c15f83c1c25d0219f11cd486d8b","name":"math-codegen","dist-tags":{"latest":"0.4.3"},"versions":{"0.1.0":{"name":"math-codegen","version":"0.1.0","keywords":["math-codegen","codegen","math","eval","compile","parse"],"author":{"name":"Mauricio Poppe","email":"mauricio.poppe@gmail.com"},"license":"MIT","_id":"math-codegen@0.1.0","maintainers":[{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"}],"bugs":{"url":"https://github.com/maurizzzio/math-codegen/issues"},"dist":{"shasum":"069696ec3b5438bcfbc25a40ce46c757401a8851","tarball":"https://registry.npmjs.org/math-codegen/-/math-codegen-0.1.0.tgz","integrity":"sha512-MiJ7O/LCoK5j7OOLPMEE44deATWB+sjH3Oe7X4fLrtlZcthPaxbLCUruRfs3GG2T8NtLBBjrs9T14jDA4l3YTw==","signatures":[{"sig":"MEYCIQD9eEpQ9NXLP+chKLhkHy8fq3eugaTP55c0vEzR6Za7SwIhALPytJ1RjD+Bc5JT8BrIYlv0Ijfjb9C6xgsrEchOvEdC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","files":["index.js","lib","LICENSE"],"_shasum":"069696ec3b5438bcfbc25a40ce46c757401a8851","gitHead":"22d44f8754c693f2844137c46d1cb42fa08bf295","scripts":{"toc":"doctoc .","lint":"eslint index.js lib test","test":"mocha -R spec test/","start":"npm run test:watch","istanbul":"istanbul cover _mocha --report lcovonly -- -R spec test/","test:watch":"nodemon --watch lib --watch test --watch index.js --exec 'npm test'"},"_npmUser":{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"},"repository":{"url":"https://github.com/maurizzzio/math-codegen","type":"git"},"_npmVersion":"2.5.1","description":"Generates code from mathematical expressions","directories":{},"_nodeVersion":"0.12.0","dependencies":{"extend":"^2.0.1","esprima":"^2.2.0"},"devDependencies":{"mocha":"^2.2.1","doctoc":"^0.13.0","eslint":"^0.21.0","nodemon":"^1.3.7","istanbul":"^0.3.8","coveralls":"^2.11.2","mocha-lcov-reporter":"^0.0.2"}},"0.2.0":{"name":"math-codegen","version":"0.2.0","keywords":["math-codegen","codegen","math","eval","compile","parse"],"author":{"name":"Mauricio Poppe","email":"mauricio.poppe@gmail.com"},"license":"MIT","_id":"math-codegen@0.2.0","maintainers":[{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"}],"bugs":{"url":"https://github.com/maurizzzio/math-codegen/issues"},"dist":{"shasum":"0ae86152cac6b435bbb1992c7e0c5ee8a5379416","tarball":"https://registry.npmjs.org/math-codegen/-/math-codegen-0.2.0.tgz","integrity":"sha512-B68cWfljQzN9wTjqtcF9E/5/j0367BcAo6GXqxN7kzUCa46MZmDWtPog/sxgz5fjTJ9Y9Z/fDmc/HtgZ3oEGuw==","signatures":[{"sig":"MEYCIQDqks+T+8KPQ1t8R2Z/Gxt3C9xZgmjuKDj7qAPiqZ/OmwIhAMdYJEKLgfmHL3Z0N6zChZS+lNerHd7gOiwSbf9SCJ+R","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","files":["index.js","lib","LICENSE"],"_shasum":"0ae86152cac6b435bbb1992c7e0c5ee8a5379416","gitHead":"3c4be14caea2bf3c41aea77112e5abda840c82fd","scripts":{"toc":"doctoc .","lint":"eslint index.js lib test","test":"mocha -R spec test/","start":"npm run test:watch","istanbul":"istanbul cover _mocha --report lcovonly -- -R spec test/","test:watch":"nodemon --watch lib --watch test --watch index.js --exec 'npm test'"},"_npmUser":{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"},"repository":{"url":"https://github.com/maurizzzio/math-codegen","type":"git"},"_npmVersion":"2.5.1","description":"Generates code from mathematical expressions","directories":{},"_nodeVersion":"0.12.0","dependencies":{"extend":"^2.0.1","esprima":"^2.2.0"},"devDependencies":{"mocha":"^2.2.1","doctoc":"^0.13.0","eslint":"^0.21.0","nodemon":"^1.3.7","istanbul":"^0.3.8","coveralls":"^2.11.2","mocha-lcov-reporter":"^0.0.2"}},"0.2.1":{"name":"math-codegen","version":"0.2.1","keywords":["math-codegen","codegen","math","eval","compile","parse"],"author":{"name":"Mauricio Poppe","email":"mauricio.poppe@gmail.com"},"license":"MIT","_id":"math-codegen@0.2.1","maintainers":[{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"}],"bugs":{"url":"https://github.com/maurizzzio/math-codegen/issues"},"dist":{"shasum":"f654b1ac07558fecfba7bc2858a88258c697ef04","tarball":"https://registry.npmjs.org/math-codegen/-/math-codegen-0.2.1.tgz","integrity":"sha512-KWo9IKyOtXBENGiAIGsoU3s+7QTOElOCM58nAE5OrsklLMtociR/Ic6t5fngqqXpG449oHFSK6Wuo80XKrbI3Q==","signatures":[{"sig":"MEUCIAZ7odi/4w1E2fwrTkY/731tpnB8kGXqjfeRue8Bq0PJAiEAl0D6xROQHn/RAvIcXZayermS6i/G0KYSwrz0XEkLxME=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","files":["index.js","lib","LICENSE"],"_shasum":"f654b1ac07558fecfba7bc2858a88258c697ef04","gitHead":"3e823fdaf0339c16db45974ca8c918c1c562b3f9","scripts":{"toc":"doctoc .","lint":"eslint index.js lib test","test":"mocha -R spec test/","start":"npm run test:watch","istanbul":"istanbul cover _mocha --report lcovonly -- -R spec test/","test:watch":"nodemon --watch lib --watch test --watch index.js --exec 'npm test'"},"_npmUser":{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"},"repository":{"url":"https://github.com/maurizzzio/math-codegen","type":"git"},"_npmVersion":"2.5.1","description":"Generates code from mathematical expressions","directories":{},"_nodeVersion":"0.12.0","dependencies":{"extend":"^2.0.1","esprima":"^2.2.0"},"devDependencies":{"mocha":"^2.2.1","doctoc":"^0.13.0","eslint":"^0.21.0","nodemon":"^1.3.7","istanbul":"^0.3.8","coveralls":"^2.11.2","mocha-lcov-reporter":"^0.0.2"}},"0.2.2":{"name":"math-codegen","version":"0.2.2","keywords":["math-codegen","codegen","math","eval","compile","parse"],"author":{"name":"Mauricio Poppe","email":"mauricio.poppe@gmail.com"},"license":"MIT","_id":"math-codegen@0.2.2","maintainers":[{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"}],"bugs":{"url":"https://github.com/maurizzzio/math-codegen/issues"},"dist":{"shasum":"3beffc6c9b1541759b6d6eeb60b22078e21032ac","tarball":"https://registry.npmjs.org/math-codegen/-/math-codegen-0.2.2.tgz","integrity":"sha512-cKTm7CNCQyJp43rfl4SVAKfIMdWXq58xSiRoDbLtOEym88NvTg7TYms61VQuWHRhnJgI23sIA449UketwwvteQ==","signatures":[{"sig":"MEUCIQC2P6wcSVA4Zy54a17K4MbglgzQDHJBIp7nZjVWZ0AQ0QIgZlDQVYlB6onX6FqBV7g8u6JPVbeCzmpiiUPUTVib904=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","files":["index.js","lib","LICENSE"],"_shasum":"3beffc6c9b1541759b6d6eeb60b22078e21032ac","gitHead":"e44c6f66597cd1b653f0dd726dce9301b10880fb","scripts":{"toc":"doctoc .","lint":"eslint index.js lib test","test":"mocha -R spec test/","start":"npm run test:watch","istanbul":"istanbul cover _mocha --report lcovonly -- -R spec test/","test:watch":"nodemon --watch lib --watch test --watch index.js --exec 'npm test'"},"_npmUser":{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"},"repository":{"url":"https://github.com/maurizzzio/math-codegen","type":"git"},"_npmVersion":"2.5.1","description":"Generates code from mathematical expressions","directories":{},"_nodeVersion":"0.12.0","dependencies":{"extend":"^2.0.1","esprima":"^2.2.0"},"devDependencies":{"mocha":"^2.2.1","doctoc":"^0.13.0","eslint":"^0.21.0","nodemon":"^1.3.7","istanbul":"^0.3.8","coveralls":"^2.11.2","mocha-lcov-reporter":"^0.0.2"}},"0.2.3":{"name":"math-codegen","version":"0.2.3","keywords":["math-codegen","codegen","math","eval","compile","parse"],"author":{"name":"Mauricio Poppe","email":"mauricio.poppe@gmail.com"},"license":"MIT","_id":"math-codegen@0.2.3","maintainers":[{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"}],"bugs":{"url":"https://github.com/maurizzzio/math-codegen/issues"},"dist":{"shasum":"e2f7277e8ebcf8d6879415d9258cc1ca878b9c48","tarball":"https://registry.npmjs.org/math-codegen/-/math-codegen-0.2.3.tgz","integrity":"sha512-Iv/AUk9WDo+3NLj4u0PIdhWXQY+KWNdVbuOMO5cJ+VI+2jJLXtBJcD3Vf8xewJWB4XQY35dVXABsl82I0NPuOw==","signatures":[{"sig":"MEQCIFxrS4+Dz6FalYguvIUUz/eEAzJ8Z2XhKJ9v0u2cqNWzAiApjnBc+yn893KXsHlxkXKrFjZlZ1yEHUqrGz5oNVPU0Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","files":["index.js","lib","LICENSE"],"_shasum":"e2f7277e8ebcf8d6879415d9258cc1ca878b9c48","gitHead":"57c3194cb50dfd239e9c1ba21a661e8142fbfd18","scripts":{"toc":"doctoc .","lint":"eslint index.js lib test","test":"mocha -R spec test/","start":"npm run test:watch","istanbul":"istanbul cover _mocha --report lcovonly -- -R spec test/","test:watch":"nodemon --watch lib --watch test --watch index.js --exec 'npm test'"},"_npmUser":{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"},"repository":{"url":"https://github.com/maurizzzio/math-codegen","type":"git"},"_npmVersion":"2.5.1","description":"Generates code from mathematical expressions","directories":{},"_nodeVersion":"0.12.0","dependencies":{"extend":"^2.0.1","esprima":"^2.2.0"},"devDependencies":{"mocha":"^2.2.1","doctoc":"^0.13.0","eslint":"^0.21.0","nodemon":"^1.3.7","istanbul":"^0.3.8","coveralls":"^2.11.2","mocha-lcov-reporter":"^0.0.2"}},"0.2.4":{"name":"math-codegen","version":"0.2.4","keywords":["math-codegen","codegen","math","eval","compile","parse"],"author":{"name":"Mauricio Poppe","email":"mauricio.poppe@gmail.com"},"license":"MIT","_id":"math-codegen@0.2.4","maintainers":[{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"}],"bugs":{"url":"https://github.com/maurizzzio/math-codegen/issues"},"dist":{"shasum":"9219b4d672db45194d02d3a1518a906095460d5a","tarball":"https://registry.npmjs.org/math-codegen/-/math-codegen-0.2.4.tgz","integrity":"sha512-fkSLg2dG0F58x5t/NNHwFE2OEm5c04NoXwz3xAkTjEV8qAMAlGIx2Qn00nVe2Dt22+hc+xJ/ZgIMdCrU7SF/JA==","signatures":[{"sig":"MEQCIAMT74ganwuKjU00NJ1E5R+BYoia9M6zjo4bLz+iOgR1AiAnuyxD/N5UnjSv8OXSO4WfO9Oa3El02Mce6/SZVDbguw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","files":["index.js","lib","LICENSE"],"_shasum":"9219b4d672db45194d02d3a1518a906095460d5a","gitHead":"70fa7b4bf4c72e8e8ca5e9a7fc0074e219ddd384","scripts":{"toc":"doctoc .","lint":"eslint index.js lib test","test":"mocha -R spec test/","start":"npm run test:watch","istanbul":"istanbul cover _mocha --report lcovonly -- -R spec test/","test:watch":"nodemon --watch lib --watch test --watch index.js --exec 'npm test'"},"_npmUser":{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"},"repository":{"url":"https://github.com/maurizzzio/math-codegen","type":"git"},"_npmVersion":"2.5.1","description":"Generates code from mathematical expressions","directories":{},"_nodeVersion":"0.12.0","dependencies":{"extend":"^2.0.1","esprima":"^2.2.0"},"devDependencies":{"mocha":"^2.2.1","doctoc":"^0.13.0","eslint":"^0.21.0","nodemon":"^1.3.7","istanbul":"^0.3.8","coveralls":"^2.11.2","mocha-lcov-reporter":"^0.0.2"}},"0.2.5":{"name":"math-codegen","version":"0.2.5","keywords":["math-codegen","codegen","math","eval","compile","parse"],"author":{"name":"Mauricio Poppe","email":"mauricio.poppe@gmail.com"},"license":"MIT","_id":"math-codegen@0.2.5","maintainers":[{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"}],"homepage":"https://github.com/maurizzzio/math-codegen#readme","bugs":{"url":"https://github.com/maurizzzio/math-codegen/issues"},"dist":{"shasum":"c4faa7d3dcb37696cbb931de454546f83aabbad1","tarball":"https://registry.npmjs.org/math-codegen/-/math-codegen-0.2.5.tgz","integrity":"sha512-G7p5Zh9buUdUeSnYU47n1tgbu0pke1YZMp9Nqy9gylUPr+hXXAlKtcR416ZmPO55+y6jFfDHQ13UNPfvTbPonw==","signatures":[{"sig":"MEQCIC/JIJRtkkiWAYWW2o+ofHWrfyNopVeQk5honh8IWourAiB+Z2Wagna/ocLppcSgHrouXxZFru5yGCvPSC8cAPpwQw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","files":["index.js","lib","LICENSE"],"_shasum":"c4faa7d3dcb37696cbb931de454546f83aabbad1","gitHead":"0099941d00c2d27dddc4357e5f3834ef5b4f08b6","scripts":{"toc":"doctoc .","lint":"eslint index.js lib test","test":"mocha -R spec test/","start":"npm run test:watch","istanbul":"istanbul cover _mocha --report lcovonly -- -R spec test/","test:watch":"nodemon --watch lib --watch test --watch index.js --exec 'npm test'"},"_npmUser":{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"},"repository":{"url":"git+https://github.com/maurizzzio/math-codegen.git","type":"git"},"_npmVersion":"2.11.2","description":"Generates code from mathematical expressions","directories":{},"_nodeVersion":"0.12.6","dependencies":{"extend":"^3.0.0","esprima":"^2.2.0"},"devDependencies":{"mocha":"^2.2.1","doctoc":"^0.14.2","eslint":"^0.21.0","nodemon":"^1.3.7","istanbul":"^0.3.8","coveralls":"^2.11.2","mocha-lcov-reporter":"^0.0.2"}},"0.3.0":{"name":"math-codegen","version":"0.3.0","keywords":["math-codegen","codegen","math","eval","compile","parse"],"author":{"name":"Mauricio Poppe","email":"mauricio.poppe@gmail.com"},"license":"MIT","_id":"math-codegen@0.3.0","maintainers":[{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"}],"homepage":"https://github.com/maurizzzio/math-codegen#readme","bugs":{"url":"https://github.com/maurizzzio/math-codegen/issues"},"dist":{"shasum":"e2395addf633e04e92693bf79d70691b0dd0563c","tarball":"https://registry.npmjs.org/math-codegen/-/math-codegen-0.3.0.tgz","integrity":"sha512-JHOJVkKBS9wvqBOHnknl08SSo/aKboLjPVOv/I0bxJb1yEnq7vPAESP6p9QawY6EF5ENEh+3T8MA+d5aGPSSnw==","signatures":[{"sig":"MEUCIHb82Z3KtTR1+3Ji+8I3K03OfMa7zSpLspiqG32gp7gdAiEA1IjqHJY6p+ZpJ7/sIW7AK4ZE9Ii01K0FVcvE6BXPq+M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","files":["index.js","lib","LICENSE"],"_shasum":"e2395addf633e04e92693bf79d70691b0dd0563c","gitHead":"05e26913efc1aa3d10fa3e69ab48481805c90b5f","scripts":{"toc":"doctoc .","lint":"standard","test":"mocha -R spec test/","start":"npm run test:watch","istanbul":"istanbul cover _mocha --report lcovonly -- -R spec test/","test:watch":"nodemon --watch lib --watch test --watch index.js --exec 'npm test'"},"_npmUser":{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"},"repository":{"url":"git+https://github.com/maurizzzio/math-codegen.git","type":"git"},"_npmVersion":"2.11.2","description":"Generates code from mathematical expressions","directories":{},"_nodeVersion":"0.12.6","dependencies":{"extend":"^3.0.0","mr-parser":"^0.1.0"},"devDependencies":{"mocha":"^2.2.1","doctoc":"^0.14.2","nodemon":"^1.3.7","istanbul":"^0.3.8","standard":"^4.5.4","coveralls":"^2.11.2","mocha-lcov-reporter":"^0.0.2"}},"0.3.1":{"name":"math-codegen","version":"0.3.1","keywords":["math-codegen","codegen","math","eval","compile","parse"],"author":{"name":"Mauricio Poppe","email":"mauricio.poppe@gmail.com"},"license":"MIT","_id":"math-codegen@0.3.1","maintainers":[{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"}],"homepage":"https://github.com/maurizzzio/math-codegen#readme","bugs":{"url":"https://github.com/maurizzzio/math-codegen/issues"},"dist":{"shasum":"4e4347843d92ad530cfdeb9f1c4cb0ac21b533fe","tarball":"https://registry.npmjs.org/math-codegen/-/math-codegen-0.3.1.tgz","integrity":"sha512-2uFUe5Q1WtfraU0/4poxJzuW6rqyyUAAhTMojC6cLZpiK3nlI6hnuXSzVaNpmyz5zOJl+0q8fBKopEoHBBrw/w==","signatures":[{"sig":"MEQCID2F9l1aEYBxnKEvIJQ6hP8cb/dXtIJqSvvKrdNx5MwOAiBjWl2RBLUF1l+1Ag4fYDXXsc8XastKz8qp/SDK6enJMA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","files":["index.js","lib","LICENSE"],"_shasum":"4e4347843d92ad530cfdeb9f1c4cb0ac21b533fe","gitHead":"ab38e9bde08d5ac156eb350c82085c0a9d9d111a","scripts":{"toc":"doctoc .","lint":"standard","test":"mocha -R spec test/","start":"npm run test:watch","istanbul":"istanbul cover _mocha --report lcovonly -- -R spec test/","test:watch":"nodemon --watch lib --watch test --watch index.js --exec 'npm test'"},"_npmUser":{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"},"repository":{"url":"git+https://github.com/maurizzzio/math-codegen.git","type":"git"},"_npmVersion":"2.11.2","description":"Generates code from mathematical expressions","directories":{},"_nodeVersion":"0.12.6","dependencies":{"extend":"^3.0.0","mr-parser":"^0.1.0"},"devDependencies":{"mocha":"^2.2.1","doctoc":"^0.14.2","nodemon":"^1.3.7","istanbul":"^0.3.8","standard":"^4.5.4","coveralls":"^2.11.2","mocha-lcov-reporter":"^0.0.2"}},"0.3.2":{"name":"math-codegen","version":"0.3.2","keywords":["math-codegen","codegen","math","eval","compile","parse"],"author":{"name":"Mauricio Poppe","email":"mauricio.poppe@gmail.com"},"license":"MIT","_id":"math-codegen@0.3.2","maintainers":[{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"}],"homepage":"https://github.com/maurizzzio/math-codegen#readme","bugs":{"url":"https://github.com/maurizzzio/math-codegen/issues"},"dist":{"shasum":"8e83d86a500dd4cf0e77fc83daa0b7e99042f33d","tarball":"https://registry.npmjs.org/math-codegen/-/math-codegen-0.3.2.tgz","integrity":"sha512-fxPLqLce4pnr3/fHaQ3E07G1C8IW1U1T/S+n7JHRrk5Cr9CCBiOQ5VL18PTjp44pV5SsrgpIJJJCtOACgEQADw==","signatures":[{"sig":"MEUCIDsYr3dboMxP/EAY0uPw55Pmitx1otIufNIFDS8bp6fQAiEAyrfwBlWg803llnWipLpayQ7VSeCWvqtOK/mKlpMMSVY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","files":["index.js","lib","LICENSE"],"_shasum":"8e83d86a500dd4cf0e77fc83daa0b7e99042f33d","gitHead":"4bb06e7da30d85fbab1061ce2a242270e5502775","scripts":{"toc":"doctoc .","lint":"standard","test":"mocha -R spec test/","start":"npm run test:watch","istanbul":"istanbul cover _mocha --report lcovonly -- -R spec test/","test:watch":"nodemon --watch lib --watch test --watch index.js --exec 'npm test'"},"_npmUser":{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"},"repository":{"url":"git+https://github.com/maurizzzio/math-codegen.git","type":"git"},"_npmVersion":"2.11.2","description":"Generates code from mathematical expressions","directories":{},"_nodeVersion":"0.12.6","dependencies":{"extend":"^3.0.0","mr-parser":"^0.1.0"},"devDependencies":{"mocha":"^2.2.1","doctoc":"^0.14.2","nodemon":"^1.3.7","istanbul":"^0.3.8","standard":"^4.5.4","coveralls":"^2.11.2","mocha-lcov-reporter":"^0.0.2"}},"0.3.3":{"name":"math-codegen","version":"0.3.3","keywords":["math-codegen","codegen","math","eval","compile","parse"],"author":{"name":"Mauricio Poppe","email":"mauricio.poppe@gmail.com"},"license":"MIT","_id":"math-codegen@0.3.3","maintainers":[{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"}],"homepage":"https://github.com/maurizzzio/math-codegen#readme","bugs":{"url":"https://github.com/maurizzzio/math-codegen/issues"},"dist":{"shasum":"8f68ce962fc38f1f998a06090a9de24b57b3b155","tarball":"https://registry.npmjs.org/math-codegen/-/math-codegen-0.3.3.tgz","integrity":"sha512-cx+wgZi7hgDm7LIgRG/UL+5eVflW6WXwlElocsJPr12F0QSJNicxEk889xGAytdh6btlcJP3f/YgS0/BAuFDfQ==","signatures":[{"sig":"MEYCIQDsly3I0O9kLRzdfqb57N9Sr30tE+FRIz6tz+pbHi3QWgIhALp79n6POiLXzy6eWOpEnYeW+tMhD5ufJeD5UDobP7ta","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","files":["index.js","lib","LICENSE"],"_shasum":"8f68ce962fc38f1f998a06090a9de24b57b3b155","gitHead":"462eb2266adc30b70c7b70675f8784b95b825155","scripts":{"toc":"doctoc .","lint":"standard","test":"mocha -R spec test/","start":"npm run test:watch","istanbul":"istanbul cover _mocha --report lcovonly -- -R spec test/","test:watch":"nodemon --watch lib --watch test --watch index.js --exec 'npm test'"},"_npmUser":{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"},"repository":{"url":"git+https://github.com/maurizzzio/math-codegen.git","type":"git"},"_npmVersion":"2.11.2","description":"Generates code from mathematical expressions","directories":{},"_nodeVersion":"0.12.6","dependencies":{"extend":"^3.0.0","mr-parser":"^0.1.0"},"devDependencies":{"mocha":"^2.2.1","doctoc":"^0.14.2","nodemon":"^1.3.7","istanbul":"^0.3.8","standard":"^4.5.4","coveralls":"^2.11.2","mocha-lcov-reporter":"^0.0.2"}},"0.3.4":{"name":"math-codegen","version":"0.3.4","keywords":["math-codegen","codegen","math","eval","compile","parse"],"author":{"name":"Mauricio Poppe","email":"mauricio.poppe@gmail.com"},"license":"MIT","_id":"math-codegen@0.3.4","maintainers":[{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"}],"homepage":"https://github.com/maurizzzio/math-codegen#readme","bugs":{"url":"https://github.com/maurizzzio/math-codegen/issues"},"dist":{"shasum":"83dd2d18ffda32b9aac44a21e03d6276dd06def8","tarball":"https://registry.npmjs.org/math-codegen/-/math-codegen-0.3.4.tgz","integrity":"sha512-WPXgPhLTErt+iQ8bSFrMFxI076CKkYWpAmesuwiquiF1TjzCAUJO7HenS4HCePXtuq7B/NJx/t4C2hwnfXXSew==","signatures":[{"sig":"MEYCIQDiggKQe9wMr63xnJefadB9P8BoOtFWi2Nd2BJShbkANwIhANJMQ+XgIZn2BJvw8GcZx3L7ItRA4gZYgq72yfz9xF9K","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","files":["index.js","lib","LICENSE"],"_shasum":"83dd2d18ffda32b9aac44a21e03d6276dd06def8","gitHead":"b0b1bc5a7eb38a273883a0408b46c4669fc7739f","scripts":{"toc":"doctoc .","lint":"standard","test":"mocha -R spec test/","start":"npm run test:watch","istanbul":"istanbul cover _mocha --report lcovonly -- -R spec test/","test:watch":"nodemon --watch lib --watch test --watch index.js --exec 'npm test'"},"_npmUser":{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"},"repository":{"url":"git+https://github.com/maurizzzio/math-codegen.git","type":"git"},"_npmVersion":"2.11.2","description":"Generates code from mathematical expressions","directories":{},"_nodeVersion":"0.12.6","dependencies":{"extend":"^3.0.0","mr-parser":"^0.1.0"},"devDependencies":{"mocha":"^2.2.1","doctoc":"^0.14.2","nodemon":"^1.3.7","istanbul":"^0.3.8","standard":"^4.5.4","coveralls":"^2.11.2","mocha-lcov-reporter":"^0.0.2"}},"0.3.5":{"name":"math-codegen","version":"0.3.5","keywords":["math-codegen","codegen","math","eval","compile","parse"],"author":{"name":"Mauricio Poppe","email":"mauricio.poppe@gmail.com"},"license":"MIT","_id":"math-codegen@0.3.5","maintainers":[{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"}],"homepage":"https://github.com/maurizzzio/math-codegen#readme","bugs":{"url":"https://github.com/maurizzzio/math-codegen/issues"},"dist":{"shasum":"4799ee4677ded147766d003cca4b7879edd40cca","tarball":"https://registry.npmjs.org/math-codegen/-/math-codegen-0.3.5.tgz","integrity":"sha512-SsFYMv33FxMKYxI1PBiaZT+8AeDITK+k/PKhbHNlOPHIz5FIPF4wy78yWqanN6luXdsXENUZgCIC6xH6bfUq1g==","signatures":[{"sig":"MEUCICxAXCHAuPdQdPZY/jbiQBfMGy8qMsWqkyL7LWTySrOgAiEAj9QXwTJcjM7geVLC/UV2Euq89lKR0YTjav1CvQhVVPk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","files":["index.js","lib","LICENSE"],"_shasum":"4799ee4677ded147766d003cca4b7879edd40cca","gitHead":"700bbfcc41224dfc82486354a84f9d9cd229f646","scripts":{"toc":"doctoc .","lint":"standard","test":"mocha -R spec test/","start":"npm run test:watch","istanbul":"istanbul cover _mocha --report lcovonly -- -R spec test/","test:watch":"nodemon --watch lib --watch test --watch index.js --exec 'npm test'"},"_npmUser":{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"},"repository":{"url":"git+https://github.com/maurizzzio/math-codegen.git","type":"git"},"_npmVersion":"2.11.2","description":"Generates code from mathematical expressions","directories":{},"_nodeVersion":"0.12.6","dependencies":{"extend":"^3.0.0","mr-parser":"^0.2.1"},"devDependencies":{"mocha":"^2.2.1","doctoc":"^0.14.2","nodemon":"^1.3.7","istanbul":"^0.3.8","standard":"^4.5.4","coveralls":"^2.11.2","mocha-lcov-reporter":"^0.0.2"}},"0.4.0":{"name":"math-codegen","version":"0.4.0","keywords":["math-codegen","codegen","math","eval","compile","parse"],"author":{"name":"Mauricio Poppe","email":"mauricio.poppe@gmail.com"},"license":"MIT","_id":"math-codegen@0.4.0","maintainers":[{"name":"mauriciopoppe","email":"mauricio.poppe@gmail.com"},{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"}],"homepage":"https://github.com/maurizzzio/math-codegen#readme","bugs":{"url":"https://github.com/maurizzzio/math-codegen/issues"},"dist":{"shasum":"e94270192621ae4adb06e00af208684f1ba344b2","tarball":"https://registry.npmjs.org/math-codegen/-/math-codegen-0.4.0.tgz","fileCount":16,"integrity":"sha512-DW7iOyPYRlHou+fDh6zNPJXt7AazqPLzXLCZq25pQFzBP8hjyR1M+q6OykE7Jqxw8fl0rj3UT5EhwqIbA4b3Lg==","signatures":[{"sig":"MEUCIGKt/MT0v4LRRIGeIuTQm8Wu7ZxAoVEcuJQaNduM9861AiEAukmxIgECNcKl3qr2QSIyBzt/TY+oIPmzJOU9CksjZDE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20060,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEWV/CRA9TVsSAnZWagAAuJwP/3tooZi1sVXoKFjCSEzZ\nA5/qbSzMIM6RrwaTkllIZkocnGXf/Xkdz8iI8yJU5CVPuZ6RMDn/Voe0GurP\nX5BcN5hd063V8tMynm1mOBEUVq6Vk6Zyq+0p0MWIJK5i8mdQmxOURzPbE2mL\nWdF01S5aOShEu8uLhSSjBb+rbnnHnIWtjZiwqDiEiNybnCnYaHlZ7pmrDJ8z\nGOTpWkbsG/uO1zEnCq+WdcF3Y9VSrnJHOybEz3NPABKoBS8tFLy8CwSyjy/0\nlHj9b3lp69EhooMF6y5y7BFN/ehUx2CBjfP6zuqDHk0VbTxrwxyjdA+k070F\nbwlUi8zchhtH394c0pcX9pihvxohGzPsvklBK9G5NXY/iBk5vEaVeaFoEbGg\ndAWKbLgO7GuiK8pZlP+w0FNvKJ7zp1hfFTqDc29w7qtRLz3CgYfrE1hMrU3W\nSVc2luujTMRQYm5Ih7ViZ81l4J/C4Ku8+LoLE1105huNBYvkTfiYSUQuqzlK\nB+yuMn/kEzlhfxoGFHuE/L87GJ9REdTkn345VOdjyXmUIFTjsnLotUNv105h\nzphQktpnvMAqlsAx5+w6lO9PDUdyhUbeK1wremlunVlBBET4ziFKKzUyWE6N\n73fl488UY3GH1SFPW2G8enHdKL9eM1UPkfNk/tqfPMmqq/q7pFyAuOMKM2oO\nLd3n\r\n=L9tT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"225dfaf778f19c6038182d42e43c98e35ee998a5","scripts":{"toc":"doctoc .","lint":"standard","test":"mocha -R spec test/","start":"npm run test:watch","istanbul":"istanbul cover _mocha --report lcovonly -- -R spec test/","test:watch":"nodemon --watch lib --watch test --watch index.js --exec 'npm test'"},"_npmUser":{"name":"mauriciopoppe","email":"mauricio.poppe@gmail.com"},"repository":{"url":"git+https://github.com/maurizzzio/math-codegen.git","type":"git"},"_npmVersion":"6.4.1","description":"Generates code from mathematical expressions","directories":{},"_nodeVersion":"8.12.0","dependencies":{"extend":"3.0.0","mr-parser":"0.2.1"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"2.3.3","doctoc":"0.14.2","nodemon":"1.7.1","istanbul":"0.3.21","standard":"4.5.4","coveralls":"2.11.4","mocha-lcov-reporter":"0.0.2"},"_npmOperationalInternal":{"tmp":"tmp/math-codegen_0.4.0_1544643966549_0.11701587592150386","host":"s3://npm-registry-packages"}},"0.4.1":{"name":"math-codegen","version":"0.4.1","keywords":["math-codegen","codegen","math","eval","compile","parse"],"author":{"name":"Mauricio Poppe","email":"mauricio.poppe@gmail.com"},"license":"MIT","_id":"math-codegen@0.4.1","maintainers":[{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"},{"name":"mauriciopoppe","email":"mauricio.poppe@gmail.com"}],"homepage":"https://github.com/maurizzzio/math-codegen#readme","bugs":{"url":"https://github.com/mauricopoppe/math-codegen/issues"},"dist":{"shasum":"cc69fa3f278e4c95755c43d7a834008e64c7108f","tarball":"https://registry.npmjs.org/math-codegen/-/math-codegen-0.4.1.tgz","fileCount":16,"integrity":"sha512-Nb/gZIGfexUlCYfzWC9W9SkoShvOlRTrFLajLQjSNoAvLhiZQH4TzTKRh/3lZdezFcPfCl+SHEcsrYf3bJQTNg==","signatures":[{"sig":"MEQCIBsg0+eQJbjsLiC0jgfAMaqC1ksHPfctmDySjaUUzm/aAiAUNTTZGlQ/qY6h7do/lT/PAdoszbW+1EpdMeRSMsyysQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCubcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmretA/9GfFPrW+dskG2Cv5IbRYAZsoySfZmJSrnm9pVWnRqC0KjFeTS\r\nxR8XhRaT0tW+PNhpv2pqX6Xv46TOvVFS8SaUkPxAJiMqsQKJgRA7UjHxpNI/\r\nx2NmTbqnJqE7SjY+3DVt40wHiUIihIRxcLdo1HXty1y96r5jxtoLueUSMFGs\r\nuuRanUpKF23O+u6YGlcNxrRju59lSlMLeY86jOj9kfHepu/f5R6QbfOBzygN\r\nUIrTslegfTlVWCcmoNbp+vzibrimaZYGrRSf3HEZLq0mGHi7J8lrbX7j5IVX\r\nlHDkCm7Q3NL4qhRLO2ncf+iejmPWoEoG3y+X4+aGs5K3CWVFS0q/1xe/EdxO\r\nQDyaU03Q7gbrMZZND5MIG4MpH2BmHduMOUJX2p2o7KC/2P1mpzZvUmhXW1jz\r\nG8MldJBBapsSWD9ssfuHo8H1a5+5rfGqlEcLbVdj9Vi5zjBEZRk2vGmFsZO6\r\nD2DSUqYJT13aPt96DD3RsbOtR4c6OTm1HaUhCrw8oYkH119sB2PbFwOzUe1E\r\nF+HBQaWQfwUDF1fCCgD08pXgoY7nkfvrWmKopNcmBxrFraqHNlrFX2b6ec8I\r\nXUywij5BYYK2EUlHl0Oo/vDePuWEc6qDr8ZVSayASa4ZuE3UXVMY4y0jR2ff\r\nwbvKMzO6hcKC4QreT9HxxFAApk11qZaRtDA=\r\n=qYmh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"4148f8a1965385de18bfdad4b6c7cf2d1b6cdd59","scripts":{"toc":"doctoc .","lint":"standard","test":"mocha -R spec test/","start":"npm run test:watch","coverage":"nyc npm run test","test:watch":"nodemon --watch lib --watch test --watch index.js --exec 'npm test'"},"_npmUser":{"name":"mauriciopoppe","email":"mauricio.poppe@gmail.com"},"repository":{"url":"git+https://github.com/maurizzzio/math-codegen.git","type":"git"},"_npmVersion":"8.3.2","description":"Generates code from mathematical expressions","directories":{},"_nodeVersion":"16.13.2","dependencies":{"extend":"^3.0.2","mr-parser":"^0.2.1"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","mocha":"^2.3.3","doctoc":"^0.14.2","nodemon":"^1.7.1","standard":"^4.5.4","coveralls":"^2.11.4"},"_npmOperationalInternal":{"tmp":"tmp/math-codegen_0.4.1_1661658844453_0.8060778279802308","host":"s3://npm-registry-packages"}},"0.4.2":{"name":"math-codegen","version":"0.4.2","keywords":["math-codegen","codegen","math","eval","compile","parse"],"author":{"url":"https://mauriciopoppe.com","name":"Mauricio Poppe"},"license":"MIT","_id":"math-codegen@0.4.2","maintainers":[{"name":"maurizzzio","email":"mauricio.poppe@gmail.com"},{"name":"mauriciopoppe","email":"5gl9sqyff@mozmail.com"}],"homepage":"https://github.com/mauriciopoppe/math-codegen#readme","bugs":{"url":"https://github.com/mauricopoppe/math-codegen/issues"},"dist":{"shasum":"00b1e909b7639a4226a3a2b7e17c721d179006c2","tarball":"https://registry.npmjs.org/math-codegen/-/math-codegen-0.4.2.tgz","fileCount":16,"integrity":"sha512-Zb24teVZ0UDH4FLepf2Yb9SacqEtJPXwb/UO21E7xPVN3TM3b5kgK3mZeAypt3syXrtHDUcY/oYZXcd5miq6hg==","signatures":[{"sig":"MEQCID3GseHrQpAbarr1xLdw9eczFqfQH3nHp+nsBGNHpFYWAiBEcZLsi++AH+tKAF87vHrijlR3Zv/azXyKAxwG6+gt2g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19703},"main":"index.js","gitHead":"abfc95c214245b06f3ceb2583393b003d1cd13eb","scripts":{"toc":"doctoc .","lint":"standard","test":"mocha -R spec test/","start":"npm run test:watch","coverage":"nyc npm run test","test:watch":"nodemon --watch lib --watch test --watch index.js --exec 'npm test'"},"_npmUser":{"name":"mauriciopoppe","email":"5gl9sqyff@mozmail.com"},"repository":{"url":"git+https://github.com/mauriciopoppe/math-codegen.git","type":"git"},"_npmVersion":"10.9.2","description":"Generates code from mathematical expressions","directories":{},"_nodeVersion":"22.15.0","dependencies":{"extend":"^3.0.2","mr-parser":"^0.2.1"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","mocha":"^10.0.0","doctoc":"^2.2.0","nodemon":"^2.0.19","standard":"^17.0.0","coveralls":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/math-codegen_0.4.2_1766772940996_0.08900007688905509","host":"s3://npm-registry-packages-npm-production"}},"0.4.3":{"name":"math-codegen","version":"0.4.3","description":"Generates code from mathematical expressions","bugs":{"url":"https://github.com/mauricopoppe/math-codegen/issues"},"license":"MIT","main":"index.js","author":{"name":"Mauricio Poppe","url":"https://mauriciopoppe.com"},"repository":{"type":"git","url":"git+https://github.com/mauriciopoppe/math-codegen.git"},"keywords":["math-codegen","codegen","math","eval","compile","parse"],"dependencies":{"extend":"^3.0.2","mr-parser":"^0.2.1"},"devDependencies":{"coveralls":"^3.1.1","doctoc":"^2.2.0","mocha":"^10.0.0","nodemon":"^2.0.19","standard":"^17.0.0","nyc":"^15.1.0"},"scripts":{"coverage":"nyc npm run test","lint":"standard","test":"mocha -R spec test/","test:watch":"nodemon --watch lib --watch test --watch index.js --exec 'npm test'","start":"npm run test:watch","toc":"doctoc ."},"gitHead":"c8c47f823cf1365cd7ba5ebf9961a3aece2f3a54","_id":"math-codegen@0.4.3","homepage":"https://github.com/mauriciopoppe/math-codegen#readme","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-wDPK9BputFrirD7dXgpeIa1nkTy08Gh+nCALwEmmHSmKoCJtTYu1PjGC6Z08FmCjkHzVkhvep2mzyJWRgtOe5A==","shasum":"46e4961e52969fc7c76c6a8c786e8003cdb416db","tarball":"https://registry.npmjs.org/math-codegen/-/math-codegen-0.4.3.tgz","fileCount":16,"unpackedSize":20083,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIASY4YBusODivqh0V9VrOeLQFV5OHFcd3SmOw9wnVK7UAiEAljoK50bHq8a9jaoLpZCb9ecSjVdhTuUs+kIctNTkEb4="}]},"_npmUser":{"name":"mauriciopoppe","email":"5gl9sqyff@mozmail.com"},"directories":{},"maintainers":[{"name":"mauriciopoppe","email":"5gl9sqyff@mozmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/math-codegen_0.4.3_1775697359158_0.8890185399640824"},"_hasShrinkwrap":false}},"time":{"created":"2015-05-17T02:18:35.853Z","modified":"2026-04-09T01:15:59.387Z","0.1.0":"2015-05-17T02:18:35.853Z","0.2.0":"2015-05-17T03:28:45.942Z","0.2.1":"2015-05-17T04:27:56.450Z","0.2.2":"2015-05-17T04:49:56.179Z","0.2.3":"2015-05-17T15:22:17.078Z","0.2.4":"2015-05-22T16:00:34.704Z","0.2.5":"2015-07-18T21:11:10.213Z","0.3.0":"2015-07-22T08:36:32.966Z","0.3.1":"2015-07-22T18:50:11.338Z","0.3.2":"2015-07-22T18:53:00.005Z","0.3.3":"2015-07-22T19:01:36.782Z","0.3.4":"2015-07-22T19:25:21.388Z","0.3.5":"2015-07-22T20:19:58.418Z","0.4.0":"2018-12-12T19:46:06.690Z","0.4.1":"2022-08-28T03:54:04.649Z","0.4.2":"2025-12-26T18:15:41.146Z","0.4.3":"2026-04-09T01:15:59.292Z"},"bugs":{"url":"https://github.com/mauricopoppe/math-codegen/issues"},"author":{"name":"Mauricio Poppe","url":"https://mauriciopoppe.com"},"license":"MIT","homepage":"https://github.com/mauriciopoppe/math-codegen#readme","keywords":["math-codegen","codegen","math","eval","compile","parse"],"repository":{"type":"git","url":"git+https://github.com/mauriciopoppe/math-codegen.git"},"description":"Generates code from mathematical expressions","maintainers":[{"name":"mauriciopoppe","email":"5gl9sqyff@mozmail.com"}],"readme":"# math-codegen\n\n[![NPM][npm-image]][npm-url]\n[![codecov](https://codecov.io/gh/mauriciopoppe/math-codegen/branch/master/graph/badge.svg)](https://codecov.io/gh/mauriciopoppe/math-codegen)\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\n> Generates JavaScript code from mathematical expressions\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  * generated with [DocToc](https://github.com/thlorenz/doctoc) *\n\n- [Description](#description)\n  - [Lifecycle](#lifecycle)\n    - [Parse](#parse)\n    - [Compile](#compile)\n    - [Eval](#eval)\n  - [Differences with math.js expression parser](#differences-with-mathjs-expression-parser)\n  - [Operators](#operators)\n- [Install](#install)\n- [Usage](#usage)\n- [API](#api)\n  - [`var instance = new CodeGenerator([options])`](#var-instance--new-codegeneratoroptions)\n  - [`instance.parse(code)`](#instanceparsecode)\n  - [`instance.compile(namespace)`](#instancecompilenamespace)\n  - [`instance.setDefs(defs)`](#instancesetdefsdefs)\n- [Examples](#examples)\n  - [built-in math](#built-in-math)\n  - [imaginary](#imaginary)\n  - [interval arithmetic](#interval-arithmetic)\n- [Inspiration projects](#inspiration-projects)\n- [License](#license)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Description\n\nAn interpreter for mathematical expressions which allows the programmer to change the usual semantic of an\noperator bringing the operator overloading polymorphism to JavaScript (emulated with function calls),\nin addition an expression can be evaluated under any adapted namespace providing expression portability between numeric libraries\n\n### Lifecycle\n\n- `parse`: a mathematical expression is parsed with [`mr-parse`](https://github.com/mauriciopoppe/mr-parser), in the ideal scenario\nit would use [math.js expression parser](http://mathjs.org/docs/expressions/index.html) however it's not modularized yet\nand including all math.js is just an overkill, probably `mr-parse` will be replaced with math.js expression parser when\nit reaches npm as a module :)\n- `compile`: the parsed string is compiled against a namespace producing executable JavaScript code\n- `eval`: the executable JavaScript code is evaluated against a context\n\n#### Parse\n\nFor example let's consider the following expression with the variable `x` which is defined by the user:\n\n```javascript\n'1 + 2 * x'\n```\n\nthe expression can be emulated with function calls instead of operators, math-codegen will map many mathematical\noperators to callable methods\n\n```javascript\n'add(1, mul(2, x))'\n```\n\nnow we can introduce the namespace `ns` where `add` and `multiply` come from\n\n```javascript\n'ns.add(1, ns.mul(2, x))'\n```\n\nthe variables (which for the parser are `symbols`\ncome from a context called `scope` but they might also be constant values defined in the namespace:\n\n```javascript\n'ns.add(1, ns.mul(2, (scope[\"x\"] || ns[\"x\"]) ))'\n```\n\nthe constant values might have different meanings for different namespaces therefore a `factory` is needed\non the namespace to transform these values into values the namespace can operate with\n\n```javascript\n'ns.add(ns.factory(1), ns.mul(ns.factory(2), (scope[\"x\"] || ns[\"x\"]) ))'\n```\n\n#### Compile\n\nNow that we have a parsed expression we have to compile it against a namespace to produce\nexecutable JavaScript code\n\n```javascript\nparse('1 + 2 * x').compile(namespace)\n\n// returns something like this\n(function (definitions) {\n  var ns = definitions.namespace\n  return {\n    eval: function (scope) {\n      // scope processing\n      // ...\n      // the string parsed above goes here\n      return ns.add(ns.factory(1), ns.mul(ns.factory(2), (scope[\"x\"] || ns[\"x\"]) ))\n    }\n  }\n})(definitions)   // definitions created by math-codegen\n```\n\n#### Eval\n\nThe object returned above can be evaluated within a context\n\n```javascript\nparse('1 + 2 * x').compile(namespace).eval(scope)\n```\n\n### Differences with math.js expression parser\n\nMath.js expression parser API is quite similar having the same lifecycle however there are some\nimportant facts I've found:\n\n- `math.js` v1.x arrays can represent matrices with `ns.matrix` or as a raw arrays, `math-codegen` doesn't\nmake any assumptions of the arrays and treats them just like any other literal allowing the namespace to\ndecide what to do with an array in its `factory` method\n\n### Operators\n\nThe following operators recognized by `mr-parser` are named as follows when compiled\n\n```javascript\n'+': 'add'\n'-': 'sub'\n'*': 'mul'\n'/': 'div'\n'^': 'pow'\n'%': 'mod'\n'!': 'factorial'\n\n// misc operators\n'|': 'bitwiseOR'\n'^|': 'bitwiseXOR'\n'&': 'bitwiseAND'\n\n'||': 'logicalOR'\n'xor': 'logicalXOR'\n'&&': 'logicalAND'\n\n// comparison\n'<': 'lessThan'\n'>': 'greaterThan'\n'<=': 'lessEqualThan'\n'>=': 'greaterEqualThan'\n'===': 'strictlyEqual'\n'==': 'equal'\n'!==': 'strictlyNotEqual'\n'!=': 'notEqual'\n\n// shift\n'>>': 'shiftRight'\n'<<': 'shiftLeft'\n'>>>': 'unsignedRightShift'\n\n// unary\n'+': 'positive'\n'-': 'negative'\n'~': 'oneComplement'\n```\n\n## Install\n\n```sh\n$ npm install --save math-codegen\n```\n\n## Usage\n\n```js\nvar CodeGenerator = require('math-codegen');\nnew CodeGenerator([options]).parse(code).compile(namespace).eval(scope)\n```\n\n## API\n\n### `var instance = new CodeGenerator([options])`\n**properties**\n* `statements` {Array} An array of statements parsed from an expression\n* `interpreter` {Interpreter} Instance of the Interpreter class\n* `defs` {Object} An object with additional definitions available during the compilation\nthat exist during the instance lifespan\n\n**params**\n* `options` {Object} Options available for the interpreter\n  * `[options.factory=\"ns.factory\"]` {string} factory method under the namespace\n  * `[options.raw=false]` {boolean} True to interpret OperatorNode, UnaryNode and ArrayNode\n   in a raw way without wrapping the operators with identifiers e.g. `-1` will be compiled as\n   `-1` instead of `ns.negative(ns.factory(1))`\n  * `[options.rawArrayExpressionElements=true]` {boolean} true to interpret the array elements in a raw way\n  * `[options.rawCallExpressionElements=false]` {boolean} true to interpret call expression\n  * `[options.applyFactoryToScope=false]` {boolean} true to apply the factory function on non-function values of the scope/namespace\n\n### `instance.parse(code)`\n\n**chainable**\n**params**\n* `code` {string} string to be parsed\n\nParses a program using [`mr-parse`](https://github.com/mauriciopoppe/mr-parser), each Expression Statement is saved in\n`instance.statements`\n\nThe documentation for the available nodes is described in [`mr-parse`](https://github.com/mauriciopoppe/mr-parser)\n\n### `instance.compile(namespace)`\n\n**chainable**\n**params**\n* `namespace` {Object}\n\nCompiles the code making `namespace`'s properties available during evaluation, **it's required\nto have the `factory` property defined**\n\n**returns** {Object}\n* `return.code` {string} the body of the function to be evaluated with `eval`\n* `return.eval` {Function} Function to be evaluated under a context\n **params**\n  * `scope` {Object}\n\n### `instance.setDefs(defs)`\n\n**params**\n* `defs` {Object}\n\nAn object whose properties will be available during evaluation, properties can be accessed by\nthe property name in the program\n\n## Examples\n\n### built-in math\n\n```javascript\n'use strict'\nvar CodeGenerator = require('math-codegen')\n\nvar numeric = {\n  factory: function (a) { return a },\n  add: function (a, b) { return a + b },\n  mul: function (a, b) { return a * b }\n}\n\n// 1 + 2 * 3 = 7\nnew CodeGenerator()\n  .parse('1 + 2 * x')\n  .compile(numeric)\n  .eval({x: 3})\n)\n```\n\n### imaginary\n\n```javascript\n'use strict'\nvar CodeGenerator = require('math-codegen')\n\nvar imaginary = {\n  factory: function (a) {\n    // a = [re, im]\n    if (typeof a === 'number') {\n      return [a, 0]\n    }\n    return [a[0] || 0, a[1] || 0]\n  },\n  add: function (a, b) {\n    var re = a[0] + b[0]\n    var im = a[1] + b[1]\n    return [re, im]\n  },\n  mul: function (a, b) {\n    var re = a[0] * b[0] - a[1] * b[1]\n    var im = a[0] * b[1] + a[1] * b[0]\n    return [re, im]\n  }\n}\n\nvar instance = new CodeGenerator()\n\n// [1, 0] + [2, 0] * [1, 1]\n// [1, 0] + [2, 2]\n// [3, 2]\ninstance\n  .parse('1 + 2 * x')\n  .compile(imaginary)\n  .eval({x : [1, 1]})\n\n// because of the way the factory works it can also receive an array as a parameter\n// [1, 0] + [2, 0] * [1, 1]\n// [1, 0] + [2, 2]\n// [3, 2]\ninstance\n  .parse('[1, 0] + [2, 0] * x')\n  .compile(imaginary)\n  .eval({x : [1, 1]});\n```\n\n### interval arithmetic\n\n```javascript\n'use strict'\nvar CodeGenerator = require('math-codegen')\n\nvar interval = {\n  factory: function (a) {\n    // a = [lo, hi]\n    if (typeof a === 'number') {\n      return [a, a]\n    }\n    return [a[0], a[1]]\n  },\n  add: function (x, y) {\n    return [x[0] + y[0], x[1] + y[1]]\n  },\n  mul: function (x, y) {\n    var ac = x[0] * y[0]\n    var ad = x[0] * y[1]\n    var bc = x[1] * y[0]\n    var bd = x[1] * y[1]\n    return [Math.min(ac, ad, bc, bd), Math.max(ac, ad, bc, bd)]\n  }\n}\n\nvar instance = new CodeGenerator()\n\n// [1, 1] + [2, 2] * [-1, 2]\n// [1, 1] + [-2, 4]\n// [-1, 5]\ninstance\n  .parse('1 + 2 * x')\n  .compile(interval)\n  .eval({x: [-1, 2]})\n```\n\n## Inspiration projects\n\n- [math.js expression parser](http://mathjs.org/docs/expressions/index.html)\n- [angular v1.x parser](https://github.com/angular/angular.js/blob/master/src/ng/parse.js)\n\n## License\n\nMIT\n\n[npm-image]: https://img.shields.io/npm/v/math-codegen.svg?style=flat\n[npm-url]: https://npmjs.org/package/math-codegen\n","readmeFilename":"README.md"}