@putout/plugin-remove-useless-replace
🐊Putout plugin adds ability to remove useless 'replace()'
Last updated a year ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (a year ago)

6 Versions

  • 2.0.0                                ...           a year ago
  • 1.0.4                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (7)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |