2.0.0 β’ Published 6 months ago
@putout/plugin-remove-useless-replace v2.0.0
@putout/plugin-remove-useless-replace 
The
replace()method returns a new string with some or all matches of apatternreplaced by areplacement. The original string is left unchanged.(c) MDN
πPutout plugin adds ability to remove useless replace.
Check it out in πPutout Editor.
Install
npm i @putout/plugin-remove-useless-replaceRule
{
"rules": {
"remove-useless-replace": "on"
}
}β Example of incorrect code
const a = 'hello'.replace(b, b);β Example of correct code
const a = 'hello';License
MIT