{"name":"@putout/plugin-convert-object-assign-to-merge-spread","version":"4.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":"^6.2.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^3.0.0","madrun":"^5.0.0","nyc":"^14.0.0","supertape":"^1.0.3"},"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.0","_nodeVersion":"13.10.1","_npmVersion":"6.12.1","dist":{"integrity":"sha512-dx+M/VRmomR7uSz7rRPVw74Twflj0zGOKyRhFcwZvUiYFpqB9kOslXwzUQ31GMp930Qok8lmbcwHFIDFM/vMTA==","shasum":"f4d11e9f03a0d6bca59e942564151d3e057cc6a0","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.0.tgz","fileCount":4,"unpackedSize":4364,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZKkFCRA9TVsSAnZWagAAlnYP+wY7uINMnpQAi1/5D6Oz\nDVX0MgjQQeKyG+25vhlj5A+/On2Ci8i0b4zaKHpVxcKxrRztcICq+dlsEdB7\nk01rijHROwxGVFtcH8/1FWd+DbQken8zg/Cqr+XuYi4ahztVGzHtSx6FIYyx\nzQzfGiIotbn8wb7qbStmecvtn3ZI4bU7tolhA8wzhS5F+zYLt48S34mc0oTl\nZTSyaLtZqTptxBed4buX+c/JUg22RVmjHh5/aJ23j986dFzm8BG6JHxAxzbc\nIawinG+SD0FqbgcErMdWWByRDoHB0xfHxU6UMkUkT3TgYPFUvlTiIpOtQh2p\nLW6sVrD+lmMxx69wVJwIAK48GKXQsGu/WHQeUstQu/zLaMxsagsACxbkllVY\nkMlu5e1vT9JR9XrwTja2Q2k5ZwVm+NVZOU6OOhP4lmN/8l+dakQS49CG8aL4\nx5I9b7tWRdBcu4UtT1d769DwgdPJFAr2STotRHW/u0RCWTq/ssjXE6NOjXb2\nnIN499X6bvgvvwxSOh3g7IVQB+IzH1rjJNQd+8gCg7ZzkS6nIgjxIBP1C3pt\n7Nk3xJBbuTj44uel+P5nFVvHOQbdbuFJrArxi7XJ0xQODfUxUMoukpAdmtzn\nXumw3UYnMCY5csPuFiy4oLffGMRYxmU34hD4AD882u5tFJkPByTFG8mhIsCn\nLP9R\r\n=8GvT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFm7k+Cd8NDYgFeQCPPKd1Vbfy4i78vWKX5rGNikFnM8AiEAj1opMbdYsk/wMOgQ0z834kNDWP++5YO6ac3DNANWBAg="}],"size":2011,"noattachment":false,"key":"/@putout/plugin-convert-object-assign-to-merge-spread/-/@putout/plugin-convert-object-assign-to-merge-spread-4.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_4.0.0_1583655173519_0.6899059916969044"},"_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":1583655173618,"_cnpm_publish_time":1583655173618,"dist-tags":{"latest":"7.0.1"}}