@putout/plugin-remove-useless-replace
🐊Putout plugin adds ability to remove useless 'replace()'
Last updated 2 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @putout/plugin-remove-useless-replace 
SYNC missed versions from official npm registry.

@putout/plugin-remove-useless-replace NPM version

The replace() method returns a new string with some or all matches of a pattern replaced by a replacement. 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-replace

Rule

{
    "rules": {
        "remove-useless-replace": "on"
    }
}

❌ Example of incorrect code

const a = 'hello'.replace(b, b);

✅ Example of correct code

const a = 'hello';

License

MIT

Current Tags

  • 2.0.0                                ...           latest (2 years ago)

6 Versions

  • 2.0.0                                ...           2 years ago
  • 1.0.4                                ...           5 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Total 9
Today 0
This Week 1
This Month 9
Last Day 0
Last Week 3
Last Month 0
Dependencies (0)
None
Dev Dependencies (7)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE