{"_id":"@putout/plugin-convert-assignment-to-arrow-function","_rev":"6-d06ebd920ed61c43da33e03da8841651","name":"@putout/plugin-convert-assignment-to-arrow-function","dist-tags":{"latest":"1.2.2"},"versions":{"1.0.0":{"name":"@putout/plugin-convert-assignment-to-arrow-function","version":"1.0.0","keywords":["putout","putout-plugin","putout-plugin-convert","plugin","convert","assignment","arrow-function"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-convert-assignment-to-arrow-function@1.0.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"http://github.com/coderaiser/putout","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"3665efc06988a0c1a31c3cc1f296beeda509104b","tarball":"https://registry.npmjs.org/@putout/plugin-convert-assignment-to-arrow-function/-/plugin-convert-assignment-to-arrow-function-1.0.0.tgz","fileCount":4,"integrity":"sha512-Rbga+W/QANgqa9mba2KVDnzQBMZhSsNRGJfsj/kd3uEvwUy/vueahatTPdJV/yQsQIlWZvIfNaV1dUXl98A36Q==","signatures":[{"sig":"MEUCIQDTlNJtloBoLH5KvpzemB4CQ7F2T4nq0KfWNVGEynsMaQIgH4Ibbqj++cQOnpAi4DVrF3U4WTLvLiHgg4Umupt7LbE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3948,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgO51+CRA9TVsSAnZWagAAMf0P/R3h2JZEfH1ieSSVN7pb\numLX05nybHZcV1Hlkam13ezlPn3RuRrHDYLZ1NyKKomOgOb5OabKZuja3w6l\nQjvRCOteNV0unQMQU6c3wDAiUd+qYOsXD/tyEIUn9UT/sIBFRAxfTcTQLwG2\nGmR24+GiyINa+JqkYGw7eRYfUFbNnMCyn51LUG06WrwvQY+XsNbBTpFYm+4l\nKaazWehfIt2w7ANiLdfklZPQeI+gm1gBBbeTvCC9lHs6L6KsFRbttY95tU6a\n+noyDX3cd8iEzwj1SGsTgAfQ1Z2mOBDmfUZ/MDM55J0kQIQhcz/4H4fIr+t2\nQExqxmus0j+SHgIDUGmUqb6PH/s3jfaA/qLPE4nvClDTkKcJekGCvAZJrWrn\noL2exs7CRi7LakyYANEhIs1NxHocPLWf6vhzyIvmBu2bCZL7iYxUPyB53LZx\nOz/sOH5+QmsP4BTPVoCYLelZPGYY8Aa0hZrKn2846d3n+IDKbJYNYAezxA+0\nU7VGmYLISiyOIdrxHrNBEK000mBmxrR6FjN3iD5zGvCYehJQhmXGZoU3c98d\nHWCb0cKRgEXJ6yS2jFkhyIJ9WwJo0niPl+3a+tYg4HmE5CWie2pEgaRzAbN8\nMaQU/H9u1rOwZzYxb/uLTQ4iRQZFGe56R3iMmsgJf1qnG2HsRrkJpHGjucYB\nGPeL\r\n=BnOk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/convert-assignment-to-arrow-function.js","engines":{"node":">=14"},"release":false,"scripts":{"lint":"madrun lint","test":"madrun test","report":"madrun report","coverage":"madrun coverage","fix:lint":"madrun fix:lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","watch:test":"madrun watch:test"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"7.5.3","description":"putout plugin adds ability convert assignment to arrow function","directories":{},"_nodeVersion":"15.10.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^7.5.0","eslint":"^7.3.1","madrun":"^8.0.1","@putout/test":"^3.0.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^7.0.0"},"peerDependencies":{"putout":">=15"},"_npmOperationalInternal":{"tmp":"tmp/plugin-convert-assignment-to-arrow-function_1.0.0_1614519677626_0.17843223732345703","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@putout/plugin-convert-assignment-to-arrow-function","version":"1.1.0","keywords":["putout","putout-plugin","putout-plugin-convert","plugin","convert","assignment","arrow-function"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-convert-assignment-to-arrow-function@1.1.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"http://github.com/coderaiser/putout","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"32f18122eaedff3272d630dcf51c2ebd6c3a5b17","tarball":"https://registry.npmjs.org/@putout/plugin-convert-assignment-to-arrow-function/-/plugin-convert-assignment-to-arrow-function-1.1.0.tgz","fileCount":4,"integrity":"sha512-gFMoLKpHozhGyOYRr39lAtYvlS4rwb553cdxuH1Fc/2evTC8OisVZQdMJzXcFODaP+6XKyqldFFZ86dVLugOxw==","signatures":[{"sig":"MEYCIQCNFkmK9LxaI/KWd1tqhrnDcOoyi/nX/ycVrJiPHtesbgIhAMVb1r1IZQ6gFZiEcDYreiN0C2EBmCn5mC2gs/Dl8qLU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4093,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYg2VCRA9TVsSAnZWagAA3cYQAIBvtRcaLUsRSPgk4D0D\nNEu4kf2XYUPhvC6gzbGz6xzyzEJ2F0rYm/Zv6KuDy65r67+NP59Aj4uIM3ld\nVB1kQZEQtuzyEdwvIQ5XqGQym9l+UYR9dp9/zmsiTncrnIq1XCYpX1l9T8gZ\nzi5EZXCQ4yMn/YhMAP5spXfDxjkOSijLOT1mmhmfbt3ANQEPk/BWuNHRbIhX\n5UDiK1BdlqmVYEu25NdjzeUN0HiH+9Dbq2WwwgLOwqLKTKZ6LPvWtAb0CJrN\nz9KVllSCFIenWWQdSbsdW5xp/yervIK/JHhGHFGuDArqcCgY3VRLjhA9TJWv\nAC5Yo4svP0D1klgVCBiQrfsNJchhfK9scTa8gjhja6dv/lCFlvP6OYYzzqCM\nkJ+2z4ljVmvrUGrspSiQkSWXf9MGrgqudtub5pwSYaWUBAAPyGsZguAgVWum\now6vpYt3bJmDfGWUjX8DIei4qxaH8z6P9OdmVeN9QK6W+C8j6DRRjVTSdQNg\nVG2fEEs6t17Ecxv3VtEWLIcmYZjl3xL3loN1vXQefzkX5fz0Z1pm3ZFyCKiQ\n59nY/j3s+kWxBiuhxlzvW42cZGwkkCZfqiwypdJOvBsWxTGv6lu7uNwtRPTR\nFPsqsk/3LBmNkKpVXCMIkary7exaupxsXrJfoqK6mu8ClQAmrlfmK6q2TuY3\n10Q/\r\n=ZgNc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/convert-assignment-to-arrow-function.js","engines":{"node":">=14"},"release":false,"scripts":{"lint":"madrun lint","test":"madrun test","report":"madrun report","coverage":"madrun coverage","fix:lint":"madrun fix:lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","watch:test":"madrun watch:test"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"7.6.0","description":"putout plugin adds ability convert assignment to arrow function","directories":{},"_nodeVersion":"15.11.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^7.5.0","eslint":"^7.3.1","madrun":"^8.0.1","@putout/test":"^3.0.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^7.0.0"},"peerDependencies":{"putout":">=15"},"_npmOperationalInternal":{"tmp":"tmp/plugin-convert-assignment-to-arrow-function_1.1.0_1617038740905_0.1466126812852524","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@putout/plugin-convert-assignment-to-arrow-function","version":"1.2.0","keywords":["putout","putout-plugin","putout-plugin-convert","plugin","convert","assignment","arrow-function"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-convert-assignment-to-arrow-function@1.2.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"http://github.com/coderaiser/putout","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"8f50a6c9d9a7ec0aec1c41fe8b46b39cd264fe71","tarball":"https://registry.npmjs.org/@putout/plugin-convert-assignment-to-arrow-function/-/plugin-convert-assignment-to-arrow-function-1.2.0.tgz","fileCount":4,"integrity":"sha512-zLYy4hUDPx3CXw5OxWR0Opy8qQJ31W/VO6WLsbCz3NYVgjydoMuQM3UxIL2LuLkd2yEtTOW8bjudLX7a+sUcJg==","signatures":[{"sig":"MEUCIQC6FOo++BzQvARWyik5AKF4BZy5/KdOgsaPYGnyn3N0GgIgbSKQTN8yZLZmK0ioUwwvT5N99bsxFfrsIY6ZFKXe+lU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4051,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYg9cCRA9TVsSAnZWagAAZQIP/1Q71JftDComJVlhKFpN\n50XlTuOpTvttiKFL4wB5EdQOlzCETuJRmCk63g+xZp9l5xcUbm6pKZJ3sSuS\nlyW1+iyra0sQggR4WutkAZ7gsVEi+JsLPPt1jy4jifdW341Ht4Qci3p2xQdN\nEIHQDuoy1URvP/tKkBP5NU1YzxXEbrah0gSphlBCBr9ylnpV/4P0T991nQyc\n9gDhHKEApu+frshYGfz8Z0HcqosfhWk9VN72QAd15gLcaAJ3BCxOAy4DMhyE\n3+YqpnuQq92kJjdTEDd6rrvX1+GvQrTNd4RvZhqtLPITDLOdCl9kiP7Gia02\nK9xejpCXXySaHd0q8vxhYVBYI8OEGPAooqC58BYteh1/mj7JDtfnSmbTryre\nprDFeNNcfe5R6MutBTp56l3EO9kJ/GxpGADpCxwvbl2Q47qKyCndA2RBF1xX\n88RQertVJ+dl0kTjcV0ajzgWOcLu6641iYx/zu2kOVgmH17YEeFWGw3/sYOm\nJ0WHuIipU7MRKFUH/Edj2pS1zZ9wGlOzzIjpunZ2u0jwLnPNrRRM1CLH7JgZ\nuUuH4Wn5ltvAwmHV6hG5loiUJKdOkK6goPUIQbb5kBgH7Nc7Bei5REL0GBMh\nGUkly9M8HQtG3CnN87ZjLuRUPVJ/sVm9M8KsDGh/68y6VGPgVyzszJNHedZ6\nBJhr\r\n=v6sj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/convert-assignment-to-arrow-function.js","engines":{"node":">=14"},"release":false,"scripts":{"lint":"madrun lint","test":"madrun test","report":"madrun report","coverage":"madrun coverage","fix:lint":"madrun fix:lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","watch:test":"madrun watch:test"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"7.6.0","description":"putout plugin adds ability convert assignment to arrow function","directories":{},"_nodeVersion":"15.11.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^7.5.0","eslint":"^7.3.1","madrun":"^8.0.1","@putout/test":"^3.0.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^7.0.0"},"peerDependencies":{"putout":">=15"},"_npmOperationalInternal":{"tmp":"tmp/plugin-convert-assignment-to-arrow-function_1.2.0_1617039196128_0.3454689082578206","host":"s3://npm-registry-packages"}},"1.2.1":{"name":"@putout/plugin-convert-assignment-to-arrow-function","version":"1.2.1","keywords":["putout","putout-plugin","putout-plugin-convert","plugin","convert","assignment","arrow-function"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-convert-assignment-to-arrow-function@1.2.1","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-assignment-to-arrow-function#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"d3c8276a10dd2d87ae2d92d1f0c3736c201a5b0d","tarball":"https://registry.npmjs.org/@putout/plugin-convert-assignment-to-arrow-function/-/plugin-convert-assignment-to-arrow-function-1.2.1.tgz","fileCount":4,"integrity":"sha512-61zaesGegMmbs8bjlLxoPVu58Q5YLFQk4q4y8525Ozjo97Kf+0HW6dvi0Yi4d9r5wWd+01rnXNIsip8vr9UrlA==","signatures":[{"sig":"MEUCIQDyYWxVmiU++4OLnJ2lUqNk77I6HIPV8AvSybmSYmmDUAIgBUJQXLIXxoqSuXJFmYzIYKdf5/fdsOcX/dql58WGwts=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4509},"main":"lib/convert-assignment-to-arrow-function.js","type":"commonjs","engines":{"node":">=14"},"gitHead":"a5615c6735219a7518a1bfd7c3adda98f87e9138","release":false,"scripts":{"lint":"madrun lint","test":"madrun test","report":"madrun report","coverage":"madrun coverage","fix:lint":"madrun fix:lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","watch:test":"madrun watch:test"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"11.1.0","description":"🐊Putout plugin adds ability convert assignment to arrow function","directories":{},"_nodeVersion":"22.14.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"^9.0.0","madrun":"^11.0.0","@putout/test":"^13.0.0","eslint-plugin-n":"^17.0.0","@putout/eslint-flat":"^3.0.0","eslint-plugin-putout":"^26.0.0"},"peerDependencies":{"putout":">=15"},"_npmOperationalInternal":{"tmp":"tmp/plugin-convert-assignment-to-arrow-function_1.2.1_1742837082994_0.39927189535962104","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"@putout/plugin-convert-assignment-to-arrow-function","version":"1.2.2","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability convert assignment to arrow function","homepage":"https://github.com/coderaiser/putout/tree/v38.5.7/packages/plugin-convert-assignment-to-arrow-function#readme","main":"lib/convert-assignment-to-arrow-function.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","putout-plugin","putout-plugin-convert","plugin","convert","assignment","arrow-function"],"devDependencies":{"@putout/eslint-flat":"^3.0.0","@putout/test":"^13.0.0","c8":"^10.0.0","eslint":"^9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^26.0.0","madrun":"^11.0.0"},"peerDependencies":{"putout":">=15"},"license":"MIT","engines":{"node":">=14"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-convert-assignment-to-arrow-function@1.2.2","gitHead":"554dae8f6f20e26966d35afbbef98d682d9fede9","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"22.14.0","_npmVersion":"11.1.0","dist":{"integrity":"sha512-c0wH8tkAlogllIIYZmxEdMRwS27c4bLLQKNgYKrCgZs4RS39dutgK41aCZQWsCKfDl9ruGF2DaEJ034BSManZg==","shasum":"833ef019635755abcf954a0a67c9404a4066c3b9","tarball":"https://registry.npmjs.org/@putout/plugin-convert-assignment-to-arrow-function/-/plugin-convert-assignment-to-arrow-function-1.2.2.tgz","fileCount":4,"unpackedSize":4510,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDZLiXdCp2RFB9cssfq9ws+9+WdI5E8Pb2A88De2dpdaQIhAN2yokswZr1E+wZHoAQGyDJQc2GUtR65/hZ6GbKk2Mgz"}]},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-convert-assignment-to-arrow-function_1.2.2_1742837903173_0.5077382763295613"},"_hasShrinkwrap":false}},"time":{"created":"2021-02-28T13:41:17.471Z","modified":"2025-03-24T17:38:23.552Z","1.0.0":"2021-02-28T13:41:17.767Z","1.1.0":"2021-03-29T17:25:41.045Z","1.2.0":"2021-03-29T17:33:16.408Z","1.2.1":"2025-03-24T17:24:43.197Z","1.2.2":"2025-03-24T17:38:23.379Z"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"license":"MIT","homepage":"https://github.com/coderaiser/putout/tree/v38.5.7/packages/plugin-convert-assignment-to-arrow-function#readme","keywords":["putout","putout-plugin","putout-plugin-convert","plugin","convert","assignment","arrow-function"],"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"description":"🐊Putout plugin adds ability convert assignment to arrow function","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"readme":"# @putout/plugin-convert-assignment-to-arrow-function [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-assignment-to-arrow-function.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-assignment-to-arrow-function\"npm\"\n\n> The [**assignment operator**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Assignment) (`=`) is used to assign a value to a variable. The assignment operation evaluates to the assigned value. Chaining the assignment operator is possible in order to assign a single value to multiple variables.\n\nMerged to [`@putout/plugin-assignment`](https://www.npmjs.com/package/@putout/plugin-assignment).\n>\n> An [**arrow function expression**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions) is a compact alternative to a **function expression**.\n>\n> (c) MDN\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert **assignment** to **arrow** function.\n\n## Install\n\n```\nnpm i @putout/plugin-convert-assignment-to-arrow-function -D\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"convert-assignment-to-arrow-function\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\nconst createRegExp = a = RegExp(a, 'g');\n```\n\n## ✅ Example of correct code\n\n```js\nconst createRegExp = (a) => RegExp(a, 'g');\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}