{"versions":{"3.2.5":{"name":"babel-plugin-jsx-control-statements","version":"3.2.5","description":"Neater control statements (if/for) for jsx","author":{"name":"Alex Gilleran","email":"alex@alexgilleran.com"},"main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/AlexGilleran/jsx-control-statements.git"},"bugs":{"url":"https://github.com/AlexGilleran/jsx-control-statements/issues"},"keywords":["react","jsx","if","else","for","each","loop","babel","react-component"],"license":"MIT","scripts":{"lint":"eslint src spec","test":"mocha spec/*.js","cover":"istanbul cover -x \"**/spec/**\" node_modules/mocha/bin/_mocha spec/*.js"},"dependencies":{"babel-core":"^6.1.2","babel-plugin-syntax-jsx":"^6.1.18"},"devDependencies":{"babel-eslint":"^6.0.3","babel-preset-react":"^6.1.2","chai":"^3.5.0","chai-spies":"^0.7.1","coveralls":"^2.11.6","eslint":"^3.4.0","eslint-config-airbnb":"^10.0.1","eslint-plugin-jsx-control-statements":"^2.1.0","eslint-plugin-react":"^6.2.0","istanbul":"^0.4.1","mocha":"^3.0.2","react":"^15.3.1","react-dom":"^15.3.1"},"gitHead":"af1f0133f03a7ac0d0723361dd2ef804ac6d4204","homepage":"https://github.com/AlexGilleran/jsx-control-statements#readme","_id":"babel-plugin-jsx-control-statements@3.2.5","_shasum":"fc19cf49efa1c408b14cefc314140d198e2eb674","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.0","_npmUser":{"name":"anonymous","email":"alex@alexgilleran.com"},"dist":{"shasum":"fc19cf49efa1c408b14cefc314140d198e2eb674","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/babel-plugin-jsx-control-statements/-/babel-plugin-jsx-control-statements-3.2.5.tgz","integrity":"sha512-AxoVWsAdOW0Yzv4N3sucgBchw4eLz24gFfnE6DmehBbEQB+FR6FimitgahzonKUZf+VLdOtM1fQVsBd5XeEeBA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAtDYfa7t6NOLmwY4rj7d9zVvzLnwG7S6TRZfNRjR6uWAiA5/bdcQql4VqKtlCdx0ny/potJe8/UYETEJs6gQkRT+Q=="}]},"maintainers":[{"name":"anonymous","email":"alex@alexgilleran.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-jsx-control-statements-3.2.5.tgz_1506408420112_0.4889022600837052"},"directories":{},"contributors":[]},"3.2.7":{"name":"babel-plugin-jsx-control-statements","version":"3.2.7","description":"Neater control statements (if/for) for jsx","author":{"name":"Alex Gilleran","email":"alex@alexgilleran.com"},"main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/AlexGilleran/jsx-control-statements.git"},"bugs":{"url":"https://github.com/AlexGilleran/jsx-control-statements/issues"},"keywords":["react","jsx","if","else","for","each","loop","babel","react-component"],"license":"MIT","scripts":{"lint":"eslint src spec","test":"mocha spec/*.js","cover":"istanbul cover -x \"**/spec/**\" node_modules/mocha/bin/_mocha spec/*.js"},"dependencies":{"babel-core":"^6.1.2","babel-plugin-syntax-jsx":"^6.1.18"},"devDependencies":{"babel-eslint":"^6.0.3","babel-preset-react":"^6.1.2","chai":"^3.5.0","chai-spies":"^0.7.1","coveralls":"^2.11.6","eslint":"^3.4.0","eslint-config-airbnb":"^10.0.1","eslint-plugin-jsx-control-statements":"^2.1.0","eslint-plugin-react":"^6.2.0","istanbul":"^0.4.1","mocha":"^3.0.2","react":"^15.3.1","react-dom":"^15.3.1"},"gitHead":"fbaaa476b375684aeef5501e4bd67eb9b83571c7","homepage":"https://github.com/AlexGilleran/jsx-control-statements#readme","_id":"babel-plugin-jsx-control-statements@3.2.7","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"anonymous","email":"alex@alexgilleran.com"},"dist":{"integrity":"sha512-gyMrR4LrNdYp9AkpvWia9R8U0Ax+5tkcylUxPdIjNk1xYwtDtv++bPTFiboALcLtxu/7gsGtTTMfSWy2c8Iy0w==","shasum":"d678af19cabd5e67c80fed58d4910897898a8955","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/babel-plugin-jsx-control-statements/-/babel-plugin-jsx-control-statements-3.2.7.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEpqhLCud+DbEF3Ah1WFbduF0MqWQBatITT2FzwQ5G9hAiAdPm+zF8jOHMd5dXdxePjf2urc+iPkxf0hTJKqE4xJpQ=="}]},"maintainers":[{"name":"anonymous","email":"alex@alexgilleran.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-jsx-control-statements-3.2.7.tgz_1506939453484_0.4065975493285805"},"directories":{},"contributors":[]},"3.2.8":{"name":"babel-plugin-jsx-control-statements","version":"3.2.8","description":"Neater control statements (if/for) for jsx","author":{"name":"Alex Gilleran","email":"alex@alexgilleran.com"},"main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/AlexGilleran/jsx-control-statements.git"},"bugs":{"url":"https://github.com/AlexGilleran/jsx-control-statements/issues"},"keywords":["react","jsx","if","else","for","each","loop","babel","react-component"],"license":"MIT","scripts":{"lint":"eslint src spec","test":"mocha spec/*.js","cover":"istanbul cover -x \"**/spec/**\" node_modules/mocha/bin/_mocha spec/*.js"},"dependencies":{"babel-core":"^6.1.2","babel-plugin-syntax-jsx":"^6.1.18"},"devDependencies":{"babel-eslint":"^6.0.3","babel-preset-react":"^6.1.2","chai":"^3.5.0","chai-spies":"^0.7.1","coveralls":"^2.11.6","eslint":"^3.4.0","eslint-config-airbnb":"^10.0.1","eslint-plugin-jsx-control-statements":"^2.1.0","eslint-plugin-react":"^6.2.0","istanbul":"^0.4.1","mocha":"^3.0.2","react":"^15.3.1","react-dom":"^15.3.1"},"gitHead":"734ce6a55fd6547e79a68def4f9f34ec39f9c657","homepage":"https://github.com/AlexGilleran/jsx-control-statements#readme","_id":"babel-plugin-jsx-control-statements@3.2.8","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"anonymous","email":"alex@alexgilleran.com"},"dist":{"integrity":"sha512-VlZlpnCNRMcAN51DDSfX4xzR2zc8wPEIcHZw/6QcYu0z2qXRqJFyooHHskOiy6Ws8Wj+dFpECfujAQzm76Zb7g==","shasum":"6d2c265d51e82518b03cbbec3a57bd37ef955c7e","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/babel-plugin-jsx-control-statements/-/babel-plugin-jsx-control-statements-3.2.8.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvjuDcdC18BWUBFzSBnYSkBlELJHopiQmZZXiUba922wIhALY4UhriqQ8DJr0dsmGu45bTr+L319jX57T3HiTCSto4"}]},"maintainers":[{"name":"anonymous","email":"alex@alexgilleran.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-jsx-control-statements-3.2.8.tgz_1506942984117_0.37824499048292637"},"directories":{},"contributors":[]},"4.0.0":{"name":"babel-plugin-jsx-control-statements","version":"4.0.0","description":"Neater control statements (if/for) for jsx","author":{"name":"Alex Gilleran","email":"alex@alexgilleran.com"},"main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/AlexGilleran/jsx-control-statements.git"},"bugs":{"url":"https://github.com/AlexGilleran/jsx-control-statements/issues"},"keywords":["react","jsx","if","else","for","each","loop","babel","react-component"],"license":"MIT","scripts":{"lint":"eslint src spec","test":"mocha spec/*.js","cover":"istanbul cover -x \"**/spec/**\" node_modules/mocha/bin/_mocha spec/*.js"},"dependencies":{"@babel/core":"^7.1.2"},"devDependencies":{"@babel/preset-react":"^7.0.0","@babel/register":"^7.0.0","babel-eslint":"^10.0.1","chai":"^3.5.0","chai-spies":"^0.7.1","coveralls":"^2.11.6","eslint":"^3.4.0","eslint-config-airbnb":"^10.0.1","eslint-plugin-jsx-control-statements":"^2.1.0","eslint-plugin-react":"^6.2.0","istanbul":"^0.4.1","mocha":"^3.0.2","react":"^15.3.1","react-dom":"^15.3.1"},"gitHead":"aea48d1291f1a9f1925895f97b303d34d80e3f07","homepage":"https://github.com/AlexGilleran/jsx-control-statements#readme","_id":"babel-plugin-jsx-control-statements@4.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"anonymous","email":"alex@alexgilleran.com"},"dist":{"integrity":"sha512-sIcKisKlodYEpKlcVLj0nRy/3iy6JFVh3kp3SuBaPVRgcKqaTcQQx1J1Dq4AgHiD2Z4SCBmeYfE3epCX5Rr1KA==","shasum":"a326ed2423d8f3c520655df06e41594143f3f80a","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/babel-plugin-jsx-control-statements/-/babel-plugin-jsx-control-statements-4.0.0.tgz","fileCount":15,"unpackedSize":125377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbybpUCRA9TVsSAnZWagAAza0P/iIIsxICEACgKNFdB47L\nZTCIwng9xjyufYSgIl08Mw1uZN97ngKwUCxmPK9cAyVgKeuAwQ2ArDOc8E+z\nFz6W5XjtIrs41/m6OnHo1XTURJAosBt+6PvlIXjLUQLEGi0M9ODdkKiy/SbQ\niPsqbLv/jk69kxBxkYQ/eshm2vst5VTZyWTY2ZZJjAnQT1lXg8c3X9qavusO\n0GHCJOlF2t485aEXB6sPE8/0NsYGU2d0fO71cXlegH54vW/lOJnuI71q+O5w\nBid8TnuZJfZHeZlFmD975AH41BPVXBTGNMmPeILAQLeBwDlZmgvzsb85no4O\nhnBbNUXgTCdOOtZvdfL6ztfG7pxSLPCWovheBdrzIi+GCTp/yLJYwdQy0d8S\nT0ak1JYPkTkzpRvlRXi+Ex44erXGnbEsxKhtNqHb88z0mJiP0q4LpKX2syMQ\nBSFJvwYRlN4MsQ37WyXtJRoXjiITwcEENOfVUjUbkO7RUCRcpX1Itujpl0Ad\nEHXtR08gyHYYj7x84O7d6tXbjaAGLV6bXtDlR9O52sJ8Y4pqkjvPO5WFhNsX\nN/R1YItw+zvqXeC6QLPIYbAUtBYUnOyjh8smeYTeMAdTUIlfTzv4re2I0HgK\nNSu6MHRSioLOAH9v8J+fGwXePbh3/AyL8b0x2sEhQbYgJoBIN7R0a+8EgmWa\nfvQj\r\n=RM8M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGbwMIpHDjQdV4mb8Na79nQ4coXM6kuZHDa4m6Vl7d4OAiEAwCmwPAyVobb5mufDqyoWNGUte3LXiXD/oZaVNMKkCRc="}]},"maintainers":[{"name":"anonymous","email":"alex@alexgilleran.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-jsx-control-statements_4.0.0_1539947091741_0.33921017930752306"},"_hasShrinkwrap":false,"contributors":[]},"4.1.0":{"name":"babel-plugin-jsx-control-statements","version":"4.1.0","description":"Neater control statements (if/for) for jsx","author":{"name":"Alex Gilleran","email":"alex@alexgilleran.com"},"main":"src/index.js","repository":{"type":"git","url":"https://github.com/AlexGilleran/jsx-control-statements"},"types":"index.ts","bugs":{"url":"https://github.com/AlexGilleran/jsx-control-statements/issues"},"keywords":["react","jsx","if","else","for","each","loop","babel","react-component"],"license":"MIT","scripts":{"lint":"eslint src spec","test":"mocha spec/tests.js","cover":"istanbul cover -x \"**/spec/**\" node_modules/mocha/bin/_mocha spec/*.js"},"dependencies":{"@babel/core":"^7.1.2"},"devDependencies":{"@babel/preset-react":"^7.0.0","@babel/register":"^7.0.0","babel-eslint":"^10.0.1","chai":"^4.2.0","chai-spies":"^1.0.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb":"^18.1.0","eslint-plugin-jsx-control-statements":"^2.1.0","eslint-plugin-react":"^7.19.0","istanbul":"^0.4.1","mocha":"^7.1.0","react":"^16.13.0","react-dom":"^16.13.0"},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2015-2016 Alex Gilleran\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","_id":"babel-plugin-jsx-control-statements@4.1.0","dist":{"shasum":"d7bec01c0aeaf4b7bfa49352110df07299777a58","integrity":"sha512-YNHX/yJ79cjZ5ZOZ6oiixoihm1SfhQKIcMfxDT+t8Olpd9NyNBrxjYjwJKxYQVZrfMBnCLxC4Mqj5Ru+OXtQ0w==","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/babel-plugin-jsx-control-statements/-/babel-plugin-jsx-control-statements-4.1.0.tgz","fileCount":20,"unpackedSize":39397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefKNECRA9TVsSAnZWagAAMZwP/j5IOIwtPYdQr/Tgmfoh\n3U3ARSD7kWi6R0bqwVjDscgWBK4e2dsCFGIWBTPDFnXsegCQG8/ubsRgW6jh\nLeSEJwSuNId+K3g6jkhKB/cbQathATcG62cZf1cP7dsdzkwJ6a/pl6IIqPHw\n3O1kaKFF2Dy0T0xNfVR8d/Z8IY45kEsj0KcFa2QAvalBH8NL5dG+cAysu1jn\n7CY+wHiz0wGiciaYEIy0q3UWkM16kHngAq+NMTsAB0neCzDCDh5Z6ASaNTPh\nPt2o/9xMMpBdugvqOLDCIQl4HPTr+7sPaQCPOESOwxz1SQIMHJIrUxft5BvR\nA+w90KK8+1OTSZvzcr35B28X6PsGKblhqPq2rCiiYCZ72ry68XV36zDahAp0\nbaN0SeiUb0cGsSA7qzanu+OdGa/VO/NFzALKmMbzOk3dyOmrIF/JjJ6y9VHm\nZ3CzUGMNCgTVCzexuKeZGWOFkjvN4rnJrLQTIHpqe6sgi6aKprk6REJvz94o\nSMu5NYE61fQI9AZbVhs5rHkzCXj3P+Kr8KKcpJRKGXAhlW9iFgDk9ZRiNuSL\nqOclcgiUCudqaXFjffza5Yws8L4mbz/Jmz1mBr8zOyHEs+ylyrBSpiaNtwHx\nJ9n6QY/bk/reBlJdG+lpnCRkQYdUK1ldoZ6K5urD6uKJb3HQzbOX+VUSdpw8\n820/\r\n=P5Wx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBskEC7iJwak0c4n9i7PR94+q2aXd7RQxlZLN2FsiCI4AiEA3Q/Va3W1TUQh/Zo+1beTWurMMOr6Txlmv6jksh4AHLk="}]},"maintainers":[{"name":"anonymous","email":"alex@alexgilleran.com"}],"_npmUser":{"name":"anonymous","email":"alex@alexgilleran.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-jsx-control-statements_4.1.0_1585226563874_0.043346789845279066"},"_hasShrinkwrap":false,"contributors":[]},"4.1.1":{"name":"babel-plugin-jsx-control-statements","version":"4.1.1","description":"Neater control statements (if/for) for jsx","author":{"name":"Alex Gilleran","email":"alex@alexgilleran.com"},"main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/AlexGilleran/jsx-control-statements.git"},"types":"index.d.ts","bugs":{"url":"https://github.com/AlexGilleran/jsx-control-statements/issues"},"keywords":["react","jsx","if","else","for","each","loop","babel","react-component"],"license":"MIT","scripts":{"lint":"eslint src spec","test":"mocha spec/tests.js","cover":"istanbul cover -x \"**/spec/**\" node_modules/mocha/bin/_mocha spec/*.js"},"dependencies":{"@babel/core":"^7.1.2"},"devDependencies":{"@babel/preset-react":"^7.0.0","@babel/register":"^7.0.0","babel-eslint":"^10.0.1","chai":"^4.2.0","chai-spies":"^1.0.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb":"^18.1.0","eslint-plugin-jsx-control-statements":"^2.1.0","eslint-plugin-react":"^7.19.0","istanbul":"^0.4.1","mocha":"^7.1.0","react":"^16.13.0","react-dom":"^16.13.0"},"gitHead":"4c77706e92b7fa4d0a236fb61dc5be3543de246b","homepage":"https://github.com/AlexGilleran/jsx-control-statements#readme","_id":"babel-plugin-jsx-control-statements@4.1.1","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-UkUHeqas9Oot9r56WaEArNZDiern6Ya1QPLd+l0NWdzJvNaiZBl/Dk8ElabGpieoKOEHE4dLRDYxls4n7wvBag==","shasum":"2016e971396efc58117d2b4aed05e48fd514a411","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/babel-plugin-jsx-control-statements/-/babel-plugin-jsx-control-statements-4.1.1.tgz","fileCount":17,"unpackedSize":39551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2kQvCRA9TVsSAnZWagAAcXgQAIB2++DIiQwNObjQL8im\nre/F5lKU9xEX/IscXn/3XowDHgIbMJzA2zHz9qe8HQE941nQsxW5/anqB6YM\naqkZrJvL35+RpEFDXoA6iLq6FiQiO5Zkgs88h6OF+BV2BAdC3iLKUuJKS7L3\nTx0zacxzXC5z8YsODSJW9FiXes9tjC4TmdS4FN+wc2P+Y7qf6P6AzwDdiybl\nkeSSAyR4ZHGdhV75SA3TwPW+5m/AvUFTYDn5nUG2y2hyUgXtIjlIFiOqMS5q\n33u6urb5g66Yz9PBbI7aycya/KDZ2e/M8WvWQHeIrr5sZ2b3oyN9kiY3MRak\nC+XIwZX7pXhYIrQDYE2yMPQcYP0oKVTyePR7onGbmm/8O4kvucbjj5N01W4K\nzgoVxPxRBCAjpeiLiWG1IXKwhf3S6meet/p+qGeVxIjIG/M7MR3o97IhtaKP\ndqfEtCV7CQuzbrezLP15/3pKN6zvdJqOWDxz/B6iGqJ7IFP9uko9HkODo7Q6\nuyRlHUYWhWUjtS4G5F4rE5O2bj1QiVO5gUbUSU0hNirZyvoyC5z11n5HIA5q\nU8QgVH8Kx4C3ALNqN+maMl0YhdpvwnV7KMB6BhKtE+jrBzmAQVECCXauZVQ7\nMxbVA9z42nTba4f47isdcwzz/w83dLJBOBtFEZamn/OqYRBZLbzZ+RGnxONx\ntIWB\r\n=rtqL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAphSebsa/wOxl/VtXWQu+OJjQ2uBeX1EY0OKONYANoCAiBOY20I/3ee8JdwkI1J11qzMlCpc4BfVh9OUiMTaCzbEA=="}]},"_npmUser":{"name":"anonymous","email":"alex@alexgilleran.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"alex@alexgilleran.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-jsx-control-statements_4.1.1_1633945000127_0.7834647046159755"},"_hasShrinkwrap":false,"contributors":[]},"4.1.2":{"name":"babel-plugin-jsx-control-statements","version":"4.1.2","description":"Neater control statements (if/for) for jsx","author":{"name":"Alex Gilleran","email":"alex@alexgilleran.com"},"main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/AlexGilleran/jsx-control-statements.git"},"types":"index.d.ts","bugs":{"url":"https://github.com/AlexGilleran/jsx-control-statements/issues"},"keywords":["react","jsx","if","else","for","each","loop","babel","react-component"],"license":"MIT","scripts":{"lint":"eslint src spec","test":"mocha spec/tests.js","cover":"istanbul cover -x \"**/spec/**\" node_modules/mocha/bin/_mocha spec/*.js"},"dependencies":{"@babel/core":"^7.1.2"},"devDependencies":{"@babel/preset-react":"^7.0.0","@babel/register":"^7.0.0","babel-eslint":"^10.0.1","chai":"^4.2.0","chai-spies":"^1.0.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb":"^18.1.0","eslint-plugin-jsx-control-statements":"^2.1.0","eslint-plugin-react":"^7.19.0","istanbul":"^0.4.1","mocha":"^7.1.0","react":"^16.13.0","react-dom":"^16.13.0"},"gitHead":"584906bf09208ca9aeb59b9733faa3f222ccd03f","homepage":"https://github.com/AlexGilleran/jsx-control-statements#readme","_id":"babel-plugin-jsx-control-statements@4.1.2","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","_npmUser":{"name":"anonymous","email":"alex@alexgilleran.com"},"dist":{"integrity":"sha512-GUEnED4GLxJnFGKidbdI0GNN5Ekih4wbAr7+ENkpUKWYxeg7UPcgwmYd7qrpxT7UWto4OZtyUJg+sm+QN4ZjkQ==","shasum":"eb90494109cad3ed1b88dc75416e2c056fca1462","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/babel-plugin-jsx-control-statements/-/babel-plugin-jsx-control-statements-4.1.2.tgz","fileCount":17,"unpackedSize":39484,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3YDECRA9TVsSAnZWagAA87QQAIqFUNqRmqeMGqP2GHNJ\nrfJocCkAk9MXlvjFLoGyIyd16PyjKvJ7gDsTtv4AiHwKoNVMrGoZXIbHAv5g\nQjmjDLrYguUkP+IjOv7Pu0tNvAY0/ysdGjdMF11bH1McsA10drnf3e47i2xp\nLSvENCM4oq0MDRiJDrwIPhBlUT0PpBQqYWnaZm8clp4v/Sy9bz6ydoiLjAnj\nUjP/Vg6QDoWytG5Ld4rcwv7/yVJKAmbQlAcSMNTsagTIlBBAT1IXmRDhTHJ3\njk17U38jdjwU8ovrftBG9+FpBUZf7dkrxtGxaAFbR70MOJ2j/iHTX+UDxCcl\nbchnZqyrQlOh5ZJgs58fiei/JN0IWUpg83L5Dju2oLR7iqCSruT9NBSIulKb\njh7XSNeiCUxfjyzFi7ArUC9wEBAv9khDv/QhoJJWTisDE8+kq6K1Nqa/e7/Y\nhxORRqUQzUt6RP02z36/l47C7o4WJkGsOm2ZUSZNJaIrEbRAxUXzCR+6KEED\nIkHic44l1nhsOLnuldl57AXF5Na/fEBD7FvYoSh7eoRv1sDjn/08UvdTTj9i\ncc3stEVm09orw3gkqwhOfPq75vPw/VAN7vghNq/GAdsZTswIPkO59DcX23Xl\nDJxnrS3gCxBsp4pYXwcyhTNqfJA/rXG9gW+nj7VSlDW7NYaCewEGxjBRUUpW\nVr1n\r\n=2PLs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFp5vCbgCCo+U/Qqe6vs8ofQlFYzwOp5m+omYh4WHapbAiEAt+vBa1yRb2F4BhvjRJ6GNp++sr1s4HP8H8EwkcsMbVQ="}]},"directories":{},"maintainers":[{"name":"anonymous","email":"alex@alexgilleran.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-jsx-control-statements_4.1.2_1641906371848_0.81323808060156"},"_hasShrinkwrap":false,"contributors":[]}},"dist-tags":{"latest":"4.1.2"},"name":"babel-plugin-jsx-control-statements","time":{"modified":"2023-08-09T12:51:12.965Z","created":"2022-01-26T21:18:32.775Z","3.2.5":"2017-09-26T06:47:00.236Z","3.2.7":"2017-10-02T10:17:33.619Z","3.2.8":"2017-10-02T11:16:24.304Z","4.0.0":"2018-10-19T11:04:51.853Z","4.1.0":"2020-03-26T12:42:44.164Z","4.1.1":"2021-10-11T09:36:40.262Z","4.1.2":"2022-01-11T13:06:12.048Z"},"readme":"# JSX Control Statements\n\n[![Build Status](https://travis-ci.org/AlexGilleran/jsx-control-statements.svg?branch=master)](https://travis-ci.org/AlexGilleran/jsx-control-statements) [![Coverage Status](https://coveralls.io/repos/AlexGilleran/jsx-control-statements/badge.svg?branch=master&service=github)](https://coveralls.io/github/AlexGilleran/jsx-control-statements?branch=master) [![npm version](https://img.shields.io/npm/v/babel-plugin-jsx-control-statements.svg?style=flat)](https://www.npmjs.com/package/babel-plugin-jsx-control-statements)\n\n_JSX-Control-Statements_ is a Babel plugin that extends JSX to add basic control statements: **conditionals** and **loops**.\nIt does so by transforming component-like control statements to their JavaScript counterparts - e.g. `<If condition={condition()}>Hello World!</If>` becomes `condition() ? 'Hello World!' : null`.\n\nDevelopers coming to React from using JavaScript templating libraries like Handlebars are often surprised that there's no built-in looping or conditional syntax. This is by design - JSX by is not a templating library, it's declarative syntactic sugar over functional JavaScript expressions. JSX Control Statements follows the same principle - it provides a component-like syntax that keeps your `render` functions neat and readable, but desugars into clean, readable JavaScript.\n\nThe only dependency _JSX-Control-Statements_ relies upon is _Babel_. It is compatible with React and React Native.\n\n:skull_and_crossbones: Beware: This is a Babel plugin. It changes your code to other code - this means that some tooling that looks at your code (e.g. static analysis, typescript) is likely to not work. This plugin dates back to when JSX was daring and Javascript was more like playdough than meccano - if you want to stay on the well-trodden path stick with writing `&&` and `map`.\n\n## Table of Contents\n\n- [A Note on Transformation and Alternative Solutions](#a-note-on-transformation-and-alternative-solutions)\n- [Installation](#installation)\n- [Syntax](#syntax)\n  - [If Tag](#if-tag)\n    - [`<If>`](#if)\n    - [`<Else ></Else>` (deprecated)](#else)\n    - [Transformation](#transformation-1)\n  - [Choose Tag](#choose-tag)\n    - [`<Choose>`](#choose)\n    - [`<When>`](#when)\n    - [`<Otherwise>`](#otherwise>)\n    - [Transformation](#transformation-2)\n  - [For Tag](#for-tag)\n    - [Transformation](#transformation-3)\n  - [With Tag](#with-tag)\n    - [Transformation](#transformation-4)\n- [Linting](#linting)\n  - [ESLint](#eslint)\n  - [FlowType](#flowtype)\n- [Alternative Solutions](#alternative-solutions)\n  - [Pure JavaScript](#pure-javascript)\n    - [Conditionals](#conditionals)\n    - [Loops](#loops)\n    - [Comparison](#comparison)\n  - [React Components](#react-components)\n- [What about Typescript](#what-about-typescript)\n- [Major Versions](#major-versions)\n- [I Want to Contribute!](#i-want-to-contribute)\n\n### A Note on Transformation and Alternative Solutions\n\nIt appears to be pretty easy to implement **conditionals as React component**, which is underlined by the amount\nof libraries which have taken this approach. However, all of them suffer from the same major caveat: A React component\nwill always evaluate all of its properties including the component body. Hence the following example will fail for\nthose libraries:\n\n```javascript\n<IfComponent condition={item}>{item.title}</IfComponent>\n```\n\nThe error will be \"Cannot read property 'title' of undefined\", because React will evaluate the body of the custom\ncomponent and pass it as \"children\" property to it. The only workaround is to force React into lazy evaluation by\nwrapping the statement in a function.\n\nThis is the reason why conditionals must be implemented in pure JS. _JSX-Control-Statements_ only adds the\nsyntactic sugar to write conditionals as component, while it transforms this \"component\" to a pure JS expression.\n\nSee [Alternative Solutions](#alternative-solutions) for a more detailed comparison and pure JS solutions.\n\n## Installation\n\nAs a prerequisite you need to have [Babel](https://github.com/babel/babel) installed and configured in your project.\n\nInstall via npm:\n\n```\n  npm install --save-dev babel-plugin-jsx-control-statements\n```\n\nThen you only need to specify _JSX-Control-Statements_ as Babel plugin, which you would typically do in your `.babelrc`.\n\n```\n{\n  ...\n  \"plugins\": [\"jsx-control-statements\"]\n}\n```\n\nIf you use the `transform-react-inline-elements` plugin, place it _after_ `jsx-control-statements`:\n\n```\n{\n  ...\n  \"plugins\": [\"jsx-control-statements\", \"transform-react-inline-elements\"]\n}\n```\n\nBabel can be used and configured in many different ways, so\n[use this guide](https://github.com/AlexGilleran/jsx-control-statements/wiki/Installation) to pick a configuration\nwhich fits your setup.\n\n## Syntax\n\n### If Tag\n\nUsed to express the most simple conditional logic.\n\n```javascript\n// simple\n<If condition={ true }>\n  <span>IfBlock</span>\n</If>\n\n// using multiple child elements and / or expressions\n<If condition={ true }>\n  one\n  { \"two\" }\n  <span>three</span>\n  <span>four</span>\n</If>\n```\n\n#### &lt;If&gt;\n\nThe body of the if statement only gets evaluated if `condition` is true.\n\n| Prop Name | Prop Type | Required           |\n| --------- | --------- | ------------------ |\n| condition | boolean   | :white_check_mark: |\n\n#### _&lt;Else /&gt; (deprecated)_\n\nThe else element has no properties and demarcates the `else` branch.\n\nThis element is deprecated, since it's bad JSX/XML semantics and breaks auto-formatting.\nPlease use `<Choose>` instead.\n\n#### Transformation\n\nIf statements transform to the _ternary operator_:\n\n```javascript\n// before transformation\n<If condition={test}>\n  <span>Truth</span>\n</If>;\n\n// after transformation\n{\n  test ? <span>Truth</span> : null;\n}\n```\n\n### Choose Tag\n\nThis is an alternative syntax for more complex conditional statements. The syntax itself is XMLish and conforms by and\nlarge to JSTL or XSLT (the attribute is called `condition` instead of `test`):\n\n```javascript\n<Choose>\n  <When condition={ test1 }>\n    <span>IfBlock</span>\n  </When>\n  <When condition={ test2 }>\n    <span>ElseIfBlock</span>\n    <span>Another ElseIfBlock</span>\n    <span>...</span>\n  </When>\n  <Otherwise>\n    <span>ElseBlock</span>\n  </Otherwise>\n</Choose>\n\n// default block is optional; minimal example:\n<Choose>\n  <When condition={true}>\n    <span>IfBlock</span>\n  </When>\n</Choose>\n```\n\n#### &lt;Choose&gt;\n\nActs as a simple container and only allows for `<When>` and `<Otherwise>` as children.\nEach `<Choose>` statement requires at least one `<When>` block but may contain as many as desired.\nThe `<Otherwise>` block is optional.\n\n#### &lt;When&gt;\n\nAnalog to `<If>`.\n\n| Prop Name | Prop Type | Required           |\n| --------- | --------- | ------------------ |\n| condition | boolean   | :white_check_mark: |\n\n#### &lt;Otherwise&gt;\n\n`<Otherwise>` has no attributes and demarcates the else branch of the conditional.\n\n#### Transformation\n\nThis syntax desugars into a (sequence of) ternary operator(s).\n\n```javascript\n// Before transformation\n<Choose>\n  <When condition={test1}>\n    <span>IfBlock1</span>\n  </When>\n  <When condition={test2}>\n    <span>IfBlock2</span>\n  </When>\n  <Otherwise>\n    <span>ElseBlock</span>\n  </Otherwise>\n</Choose>;\n\n// After transformation\n{\n  test1 ? (\n    <span>IfBlock1</span>\n  ) : test2 ? (\n    <span>IfBlock2</span>\n  ) : (\n    <span>ElseBlock</span>\n  );\n}\n```\n\n### For Tag\n\nDefine `<For>` like so:\n\n```javascript\n  // you must provide the key attribute yourself\n  <For each=\"item\" of={ this.props.items }>\n    <span key={ item.id }>{ item.title }</span>\n  </For>\n\n  // using the index as key attribute is not stable if the array changes\n  <For each=\"item\" index=\"idx\" of={ [1,2,3] }>\n    <span key={ idx }>{ item }</span>\n    <span key={ idx + '_2' }>Static Text</span>\n  </For>\n```\n\n| Prop Name | Prop Type                      | Required           | description                                                                                                                               |\n| --------- | ------------------------------ | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |\n| of        | array or collection(Immutable) | :white_check_mark: | the array to iterate over. This can also be a collection (Immutable.js) or anything on which a function with the name `map` can be called |\n| each      | string                         |                    | a reference to the current item of the array which can be used within the body as variable                                                |\n| index     | string                         |                    | a reference to the index of the current item which can be used within the body as variable                                                |\n\nNote that a `<For>` _cannot_ be at the root of a `render()` function in a React component, because then you'd\npotentially have multiple components without a parent to group them which isn't allowed. As with `<If>`, the same rules\nas using `Array.map()` apply - each element inside the loop should have a `key` attribute that uniquely identifies it.\n\n#### For Tag - Alternative Syntax\n\nFor those using Typescript, the previous syntax introduces several issues with undefined variables. To deal with this issue, we introduce a following syntax, inspired by [tsx-control-statements](https://www.npmjs.com/package/tsx-control-statements).\n\n```javascript\n// before transformation\n<For\n  of={items}\n  body={(item, index) => (\n    <span key={item.id}>\n      {index}. {item.title}\n    </span>\n  )}\n/>;\n\n// after transformation\n{\n  items.map(function(item, index) {\n    <span key={item.id}>\n      {index}. {item.title}\n    </span>;\n  });\n}\n```\n\n| Prop Name | Prop Type                      | Required           | description                                                                                                                               |\n| --------- | ------------------------------ | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |\n| of        | array or collection(Immutable) | :white_check_mark: | the array to iterate over. This can also be a collection (Immutable.js) or anything on which a function with the name `map` can be called |\n| body      | map expression                 |                    | expression of the map statement                                                                                                           |\n\n### With Tag\n\nUsed to assign values to local variables:\n\n```javascript\n// simple\n<With foo={ 47 } bar={ 'test' }>\n  <span>{ foo }</span>\n  <span>{ bar }</span>\n</With>\n\n// nested\n<With foo={ 47 }>\n  <With bar={ 'test' }>\n    <span>{ foo }</span>\n    <span>{ bar }</span>\n  </With>\n</With>\n```\n\n| Prop Name | Prop Type | Required | description                                              |\n| --------- | --------- | -------- | -------------------------------------------------------- |\n| any name  | any type  |          | assign prop value to a local variable named by prop name |\n\nYou may assign multiple variables with a single `<With>` statement. The defined variable is\navailable only within the `<With>` block.\n\n#### Transformation\n\n`<With>` statements transform to immediately-invoked function expressions:\n\n```javascript\n// before transformation\n<With foo={47}>\n  <span>{foo}</span>\n</With>;\n\n// after transformation\n{\n  (function(foo) {\n    return <span>{foo}</span>;\n  }.call(this, 47));\n}\n```\n\n## Linting\n\n### ESLint\n\nSince all control statements are transformed via Babel, no `require` or `import` calls are needed. This in turn\n(well, and some more cases) would lead to warnings or errors by ESLint about undefined variables.\n\nBut fortunately you can use this\n[ESLint plugin for _JSX-Control-Statements_](https://github.com/vkbansal/eslint-plugin-jsx-control-statements)\nto lint your code.\n\n### FlowType\n\nThere's still not a perfect solution for FlowType given that it doesn't provide a lot of plugin functionality\n(at least not yet). Flow definitions are available in `jsx-control-statements.latest.flow.js` for Flow >= 0.53, or `jsx-control-statements.flow.js` (deprecated) for Flow < 0.53 - you can pick which file to use [like this](https://github.com/AlexGilleran/jsx-control-statements/pull/68#issuecomment-323562980). These will stop the\ntype checker complaining about statements being undeclared. As of now there's no neat way to make the Flow checker\nrecognise `each` attributes in `<For>` loops as a variable - the best workaround for now is something like:\n\n```javascript\nrender() {\n  declare var eachVariable: string;\n\n  return (\n    <For each=\"eachVariable\" of={[\"hello\", \"world\"]}>\n      {eachVariable}\n    </For>\n  );\n}\n```\n\nIf you know of a better way to work around this please let us know!\n\n## Alternative Solutions\n\n### Pure JavaScript\n\nSince everything will be compiled to JavaScript anyway, you might prefer to stick to pure JavaScript solutions.\n\n#### Conditionals\n\nProbably the most common way for simple conditionals is the use of the && operator:\n\n```javascript\n// simple if\n{\n  test && <span>true</span>;\n}\n\n// additionally the else branch\n{\n  !test && <span>false</span>;\n}\n```\n\nThe ternary operator is probably more elegant for if / else conditionals:\n\n```javascript\n// simple\n{\n  test ? <span>true</span> : <span>false</span>;\n}\n\n// with multiple children\n{\n  test ? (\n    [<span key=\"1\">one</span>, <span key=\"2\">two</span>]\n  ) : (\n    <span>false</span>\n  );\n}\n```\n\nAnother approach is to refactor your conditional into a function:\n\n```javascript\ntestFunc(condition){\n  if(condition) {\n    return <span>true</span>;\n  }\n  else {\n    return <span>false</span>\n  }\n}\n\nrender() {\n  return (\n    <div>{ testFunc(test) }</div>\n  )\n}\n```\n\n#### Loops\n\nNot many options here:\n\n```javascript\n{\n  items.map(function(item) {\n    <span key={item.id}>{item.title}</span>;\n  });\n}\n```\n\n#### Comparison\n\nArguments pro _JSX-Control-Statements_ in comparison to pure JS solutions:\n\n- More intuitive and easier to handle for designers and people with non-heavy JS background\n- JSX does not get fragmented by JS statements\n- Better readability and neatness, but that probably depends on you\n\nCons:\n\n- Penalty on build-time performance\n- Depends on Babel 6\n- Some Babel configuration\n\n### React Components\n\nThere are a reasonable amount of React components for conditionals (e.g. [react-if](https://github.com/romac/react-if), which inspired this in the first place), _JSX-Control-Statements_ is the only approach we know of that avoids execution of all branches (see the [intro section](#a-note-on-transformation-and-alternative-solutions)), and there seems to be no other component-based solution to looping - while it would be possible to make a component that renders everything in `props.children` for every element of an array, you'd have to access the members of the array in that component instead of the one that uses it.\n\nFor more discussion on `If` in React by the react team, have a look at https://github.com/reactjs/react-future/issues/35.\n\nTo sum up:\n\n- Conditionals don't execute invalid paths\n- Loops with variable references to each element and index are made possible\n- No penalty on runtime performance\n- No import / require statements needed to use control statements\n- It works exactly as JSX is supposed to work: Plain syntactic sugar\n\nCons:\n\n- Depends on Babel 6\n- Some Babel configuration\n- Slightly longer build times\n- Requires an extra plugin to work with ESLint\n\n## What about Typescript?\n\n[There's a version for that by @KonstantinSimeonov!](https://github.com/KonstantinSimeonov/tsx-control-statements)\n\n## Major Versions\n\n- 4.x.x is a pure Babel plugin supporting Babel >= 7.\n- 3.x.x is a pure Babel plugin supporting Babel >= 6.\n- 2.x.x was a Babel plugin supporting Babel >= 6, and a set of JSTransform visitors.\n- 1.x.x was a Babel plugin supporting Babel <= 5, and a set of JSTransform visitors.\n\nThis used to support both JSTransform and Babel, but as JSTransform is no longer maintained support was dropped. You can\nfind the code for the JSTransform version at https://github.com/AlexGilleran/jsx-control-statements-jstransform.\n\n## I Want to Contribute!\n\nYay! Please read the [Contributor's Guide](https://github.com/AlexGilleran/jsx-control-statements/blob/master/CONTRIBUTING.md).","users":{}}