{"name":"@putout/plugin-convert-object-assign-to-merge-spread","version":"1.3.0","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":"^1.3.0","coveralls":"^3.0.0","eslint":"^6.2.0","eslint-plugin-node":"^9.1.0","eslint-plugin-putout":"^2.0.0","madrun":"^3.0.0","nyc":"^14.0.0","supertape":"^1.0.3"},"peerDependencies":{"putout":">=4.31"},"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@1.3.0","_nodeVersion":"12.9.1","_npmVersion":"6.10.0","dist":{"integrity":"sha512-O9VeUAgCGQFFVuEptCgocMjsOVs9Ga74UBUdWtaGmdD+IW5WJ+Gc3BI+j7bKCbsUoqnEf3m06qYzk6RzkyAskA==","shasum":"f148615f80c80b7f14091ad44ee669e2059ec622","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-object-assign-to-merge-spread/download/@putout/plugin-convert-object-assign-to-merge-spread-1.3.0.tgz","fileCount":4,"unpackedSize":4773,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaPrhCRA9TVsSAnZWagAA+VAP/1OIZ6pLOaBgcgoFyYHn\nVT5BeH7mNEr5eZZpfxshf89xhoIIK3iYhQpB/NvCZJr7z5YU7XRWBuJ24SOH\nRTRdk1aQu7XN6lkekxHUjbLL4w2+jLHHoThdU2L8lvdLE1Alks9VFFEKgN2y\nFvNITswHWD7RMJHddp/xUJ4h4Ne5lTSK3+kouQ0Pla+GT5Ws57SA3R9eBUrG\n26byOmPMUh/bANSbhjzV0mBDPJPIOBwDI9e98nhBQURQnM0+WuvrByJRLTo7\n7TM1VTT94sAp2213AC/aDdimmIJt0G4DaWJMHmV6tBi/tzkBd6weIplvQPyx\n4VkB43Q/2nbg7zQp7Yr/aQ5zsmhuN7l61+JTVNrMxBgxFSuR2IXZ8Am4lAc2\nKjMBuqCr/zC+RYmbDrGriXw6rdmmzf1b/U+XRA/peR1PjStqvP1U83LOX7Rn\nua7FEFsuAwO3SNd2bpzEvjVG/j/JFCvwx3XkN7BESsjUNB+3idoS0mnK7BCX\nvfoiIZ+R3XeflKLpuE9UjeL5vVhoAUDt6Ue+5ekV8FE6nwjnHVvnvJW5eUub\n3G3lPb+01JqjFLw4jHicIF9nu66vqKvfIHHRf9SBQ6cCFRnzB+q+uVo3lQM+\ndZP0m6G7q49GGNiz95/RsfaQnRJfX2tVUjBG3eZNuyRmw8ngHDnUHa5jbU9R\n062J\r\n=N/Yx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUtoUWj1HOiLrfvm3yWXiuNz+FoX4CUjb5fGSUV7jOBwIhAJ2bg9flenffumdwrqKeiM7PGTmym7s2LBd1sJ9c9Uc5"}],"size":2119,"noattachment":false,"key":"/@putout/plugin-convert-object-assign-to-merge-spread/-/@putout/plugin-convert-object-assign-to-merge-spread-1.3.0.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_1.3.0_1567161057273_0.056705625156330486"},"_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":1567161057381,"_cnpm_publish_time":1567161057381,"dist-tags":{"latest":"7.0.1"}}