{"name":"babel-plugin-minify-constant-folding","version":"0.1.2","description":"Tries to evaluate expressions and inline the result.","homepage":"https://github.com/babel/babili#readme","repository":{"type":"git","url":"https://github.com/babel/babili/tree/master/packages/babel-plugin-minify-constant-folding"},"bugs":{"url":"https://github.com/babel/babili/issues"},"author":{"name":"amasad"},"license":"MIT","main":"lib/index.js","keywords":["babel-plugin"],"dependencies":{"babel-helper-evaluate-path":"^0.1.0"},"_id":"babel-plugin-minify-constant-folding@0.1.2","scripts":{},"_shasum":"53f05f792df7d7ceca4c490408ff11a961f9d01c","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.10.0","_npmUser":{"name":"boopathi","email":"me@boopathi.in"},"dist":{"shasum":"53f05f792df7d7ceca4c490408ff11a961f9d01c","tarball":"http://registry-npm.ywwl.com/babel-plugin-minify-constant-folding/download/babel-plugin-minify-constant-folding-0.1.2.tgz","integrity":"sha512-+QCehSVgirGNbLDH/KYrcDNnmp5MMG/qYZkkKv5OBxIqcMk2ivqLSNWfeZH62b5Qj0kBnsKuZMbkBjbZfmlluw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHEtR6mmCfA95nAT6eVcu3o2WevbBV0IoTFAPNiYVLrRAiA93kwlKLgRCrIKN1a8KOxJq6EDlFLvb85Boo+1D+bnFg=="}],"size":4152,"noattachment":false,"key":"/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.1.2.tgz"},"maintainers":[{"email":"loganfsmyth@gmail.com","name":"loganfsmyth"},{"email":"vignesh.shanmugam22@gmail.com","name":"vignesh.shanmugam"},{"email":"hi@henryzoo.com","name":"hzoo"},{"email":"me@boopathi.in","name":"boopathi"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-minify-constant-folding-0.1.2.tgz_1497368504634_0.7528601097874343"},"directories":{},"readme":"# babel-plugin-minify-constant-folding\n\nTries to evaluate expressions and inline the result.\n\n## Example\n\n**In**\n\n```javascript\n\"a\" + \"b\"\n2 * 3;\n4 | 3;\n\"b\" + a + \"c\" + \"d\" + g + z + \"f\" + \"h\" + \"i\"\n\n[a, b, c].concat([d, e], f, g, [h]);\n[\"a\", \"b\", \"c\"].join();\n[\"a\", \"b\", \"c\"].join('@');\n[1, 2, 3].length;\n[1, 2, 3][1];\n[1, 2, 3].shift();\n[1, 2, 3].slice(0, 2);\n[a, b, c].pop();\n[a, b, c].reverse();\n\"a,b,c\".split(\",\");\n\"abc\"[0];\n\"abc\".charAt();\n\"abc\".charAt(1);\n\"abc\".length;\n```\n\n**Out**\n\n```javascript\n\"ab\";\n6;\n7;\n\"b\" + a + \"cd\" + g + z + \"fhi\";\n\n[a, b, c, d, e, f, g, h];\n\"a,b,c\";\n\"a@b@c\";\n3;\n2;\n2;\n[1, 2];\nc;\n[c, b, a];\n[\"a\", \"b\", \"c\"];\n\"a\";\n\"a\";\n\"a\";\n\"b\";\n3;\n```\n\n## Installation\n\n```sh\nnpm install babel-plugin-minify-constant-folding --save-dev\n```\n\n## Usage\n\n### Via `.babelrc` (Recommended)\n\n**.babelrc**\n\n```json\n{\n  \"plugins\": [\"minify-constant-folding\"]\n}\n```\n\n### Via CLI\n\n```sh\nbabel --plugins minify-constant-folding script.js\n```\n\n### Via Node API\n\n```javascript\nrequire(\"@babel/core\").transform(\"code\", {\n  plugins: [\"minify-constant-folding\"]\n});\n```\n\n## Options\n\n+ `tdz` - Account for TDZ (Temporal Dead Zone)\n","publish_time":1497368505517,"_cnpm_publish_time":1497368505517,"dist-tags":{"canary":"0.5.0-alpha.9","latest":"0.5.0"}}