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
{
"rules": {
"remove-duplicate-keys": "on"
}
}
const a = {
x: 'hello',
...z,
x: 'world',
};
const a = {
...z,
x: 'world',
};
MIT