{"name":"@putout/plugin-convert-object-assign-to-merge-spread","version":"1.0.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":"^5.6.0","eslint-plugin-node":"^8.0.0","eslint-plugin-putout":"^1.4.4","madrun":"^2.0.0","nyc":"^13.0.1","supertape":"^1.0.3"},"peerDependencies":{"putout":">=3.9.0"},"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.0.0","_nodeVersion":"11.12.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-youHtGfIhQweBhRl0Y+18xaqKwAsc1GdoDaCx+BOVDeLj0pVq69+6M+oxowVAzHtT5uSkjLXYBKbja/iJOZOQg==","shasum":"d0ea15fa929326ecd3efc3eaab5bff0123e0115b","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-object-assign-to-merge-spread/download/@putout/plugin-convert-object-assign-to-merge-spread-1.0.0.tgz","fileCount":4,"unpackedSize":4756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclN80CRA9TVsSAnZWagAA5+IP/0KmHNm3y8dO5wESpttD\n2LxC467ES2W3LQlxTjMyMSHpI8C0rhiW1ogvJPfw0O8lsZKOIDWLAZbuqhQw\niIRbKrSlUIG4+GazMBhLJ2CnJTs0WtYu0urAerwj46HUgBPa056Jqx70Q8rt\n5YymhcqoI/CgsSX9ZD2WQGHcexT3LXLcTarAZ/J5XSH/ZLcEy17Xt5pJSqLo\ntjOlSnC50tDASmVFYhKZ7CHFNYE1w8EojexY8iY8DdVDPntwEClphT2KO1hY\nXYpd0iifamZ8q/YIeFfntX3gwSKWxLJiY3dSFhiMt1nm/0M14z9E+mCPktUb\nsQo9hRYR88Vdk6XS6+hLaTlWn/rEdYel2Sc4WvGk8tiYIir4XFOCdnv+kxe7\nXebldU6U1CJiAr818lTcxNI3ZrinwVPRBB6kyA/vIdD4NkS5Z2zs4T313JSD\nfOmS0h1gWiHDyAfEwhAVfSjvgqrSTbHASGTwLF+FGI2i/0+Cf5rEUFYTSpVI\nYYtw7W9uHursLjXDPcipV0ou9OVLXdc9NChN8nv84gzI5pHvw6MQJP/Dxyib\nfFBdV2bt4BP0R1OpdOow3yzKm2GV3W+bZ3DRuTbXiU4x4qq+f586C58/+G7B\nyw5n8U+ygZiPlaW8h6+c8uSzrK80HbZa0mD49uxvmJzC/qEa9XwIp340n00c\nroSh\r\n=wMz6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdlx62nWgQ5PFMXeL7usrZ01iEjiVh5yRHgVerb97z9QIgPE9BoSA2bEggDJc2O0KxVw8L6x/a9hebuvp8qyRJqoE="}],"size":2134,"noattachment":false,"key":"/@putout/plugin-convert-object-assign-to-merge-spread/-/@putout/plugin-convert-object-assign-to-merge-spread-1.0.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.0.0_1553260340000_0.941963691891677"},"_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":1553260340195,"_cnpm_publish_time":1553260340195,"dist-tags":{"latest":"7.0.1"}}