$ npm install @putout/plugin-remove-useless-operand
The increment operator (
++
) adds one to its operand and returns a value.The addition assignment operator (
+=
) adds the value of the right operand to a variable and assigns the result to the variable.(c) MDN
🐊Putout plugin adds ability to remove useless operand.
npm i @putout/plugin-remove-useless-operand
{
"rules": {
"remove-useless-operand": "on"
}
}
a = a + b;
a = b + a;
b += 1;
a += b;
++b;
MIT
© 2010 - cnpmjs.org x YWFE | Home | YWFE