The
Object.assign()
method copies all enumerable own properties from one or more source objects to a target object. It returns the modified target object.(c) MDN
🐊Putout plugin adds ability to remove useless assign
.
Check it out in 🐊Putout Editor.
npm i @putout/plugin-remove-useless-assign
{
"rules": {
"remove-useless-assign": "on"
}
}
const load = stub().rejects(assign(Error('LOAD USED')));
const load = stub().rejects(Error('LOAD USED'));
MIT