@putout/plugin-remove-duplicate-keys
v5.1.0
Published
šPutout plugin adds ability to find and remove duplicate keys
Downloads
64,340
Readme
@putout/plugin-remove-duplicate-keys
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.
Install
npm i @putout/plugin-remove-duplicate-keys
Rule
{
"rules": {
"remove-duplicate-keys": "on"
}
}
ā Example of incorrect code
const a = {
x: 'hello',
...z,
x: 'world',
};
ā Example of correct code
const a = {
...z,
x: 'world',
};
License
MIT