🐊Putout plugin adds ability to find and remove duplicate keys
npm install @putout/plugin-remove-duplicate-keys[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-remove-duplicate-keys.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-remove-duplicate-keys"npm"
> An object initializer is a comma-delimited list of zero or more pairs of property names and associated values of an object, enclosed in curly braces ({}).
>
> (c) MDN
🐊Putout plugin adds ability to find and remove duplecate keys.
```
npm i @putout/plugin-remove-duplicate-keys
`json`
{
"rules": {
"remove-duplicate-keys": "on"
}
}
`js`
const a = {
x: 'hello',
...z,
x: 'world',
};
`js`
const a = {
...z,
x: 'world',
};
> SyntaxError: Duplicate parameter name not allowed in this context
>
> (c) MDN
Argument name clash:
`diff``
-const a = ({b, b, ...c}) => {};
+const a = ({b, ...c}) => {};
MIT