{"name":"@putout/plugin-convert-object-assign-to-merge-spread","version":"4.0.1","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"putout plugin adds ability to convert Object.assign to merge spead","homepage":"http://github.com/coderaiser/putout","main":"lib/convert-object-assign-to-merge-spread.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","remove","constant-conditions"],"devDependencies":{"@putout/test":"^2.0.0","coveralls":"^3.0.0","eslint":"^7.0.0-rc.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^4.0.0","madrun":"^6.0.0","nyc":"^15.0.1","supertape":"^2.0.0"},"peerDependencies":{"putout":">=7.17"},"license":"MIT","engines":{"node":">=8.3.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_id":"@putout/plugin-convert-object-assign-to-merge-spread@4.0.1","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-YnpydfRs1pzrOqy49LPIXkGIVPV9IsnT3ZLK8kzKDDXbNB4Xqc/ANS5Tzp7TK3FTRGBQYv/+c/1Pg+SyOgKQSg==","shasum":"d0ec153668f6632d834d73ce4b9ce5c5c2dc4cc6","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-object-assign-to-merge-spread/download/@putout/plugin-convert-object-assign-to-merge-spread-4.0.1.tgz","fileCount":4,"unpackedSize":4546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8L0NCRA9TVsSAnZWagAA/1QP/R/ZJW6/j6pbSl2HUZgV\nUpMfoSmCekoj4cP12wURFdw7sbdopocD+AgBgnbXK31Y4J/wsGorpZnP68Wz\nET5Ny/4z0C9UB6SMskAjQbaUOKgFXyPKLmtpuJ/i7hR3CMJk+04n4EViRySJ\njG/ptb3Jlh0evlWGtRd1cjsP/WkcDk48Yi0JOzCvO6K/SOwezwgD6cYDj+33\ndBdYgO/fUvm40TLHf8Ybls7vr1zRgFxtSlP2L3tMNvaK+0uhQvI3DkrCUSD8\n9B7Qzen8HyUcXbN7ZhMImlgn+Tr/ok+KEVLlmniRpvBToprPfiVV3if0taaY\na8SeXIfSyL1V42i5GyXjw0wRxtrwzZmkgj3aNoBPn4P7y2O+r61F4o695MNE\nmvK5BPH5jNAP289w3FHH+H7dwsh32ik/XMTv8KSS3ZpWHm4Z3NiO4GJ1993c\ncg8v30JDdDKT87/IhAXTJveOf3HhawAg2lLZ+YF+uLc0rlaUqDkXtKyA+7BG\n9K2pBS3YPnejSzOU4bdpiYKo2DXS9ZSSVkCl+rHjvLtc1B2kv77T6OdQRJ6L\nCe/5lQ4YnUockPEeKDC3d3QkFXQHPtDIz2MLkjLBBnTGhcTiGwrB13bWnked\nmkjYULJAu8VhgorxNkW1yLH9ze13MpCAOTJnuQAJvIdRxXxmwQGtOi1+kk0Q\ng5KF\r\n=QYCL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdsDps27v27tfAfQcDnKBF4Oloq0nzQ9dLC3E+3r4aYQIgLSciLY78sbyWDjng4Bm5a5d6OyguWkusT/pji/zPoMM="}],"size":2055,"noattachment":false,"key":"/@putout/plugin-convert-object-assign-to-merge-spread/-/@putout/plugin-convert-object-assign-to-merge-spread-4.0.1.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-convert-object-assign-to-merge-spread_4.0.1_1592835341208_0.7954505469791004"},"_hasShrinkwrap":false,"readme":"# @putout/plugin-convert-object-assign-to-merge-spread [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-object-assign-to-merge-spread.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-object-assign-to-merge-spread \"npm\"\n\n> The [`Object.assign()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) method copies all enumerable own properties from one or more source objects to a target object and returns the modified target object.\n>\n> [**Spread**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax) syntax (`...`) allows an object expression to be expanded in places where zero or more key-value pairs are expected.\n>\n> (c) MDN\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert `Object.assign()` to merge **spread** since it shorter but does (mostly) the same.\n\n## Install\n\n```\nnpm i @putout/plugin-convert-object-assign-to-merge-spread -D\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"convert-object-assign-to-merge-spread\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\nfunction merge(a) {\n    return Object.assign({}, a, {\n        hello: 'world',\n    });\n}\n```\n\n## ✅ Example of correct code\n\n```js\nfunction merge(a) {\n    return {\n        ...a,\n        hello: 'world',\n    };\n}\n```\n\n## Comparison\n\nLinter | Rule | Fix\n--------|-------|------------|\n🐊 **Putout** | [`convert-object-assign-to-merge-spread`](https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-object-assign-to-merge-spread#readme) | ✅\n🦕 **ESLint** | [`prefer-object-spread`](https://eslint.org/docs/rules/prefer-object-spread) | ✅\n\n## License\n\nMIT\n","publish_time":1592835341381,"_cnpm_publish_time":1592835341381,"dist-tags":{"latest":"7.0.1"}}