Remove dead code
Dead code is just as bad as duplicate code. There’s no reason to keep it in your codebase. If it’s not being called, get rid of it! It will still be safe in your version history if you still need it.
Bad:12345678910function oldRequestModule(url) { // ...}function newRequestModule(url) { // ...}const req = newRequestModule;inventoryTracker('apples', req, 'www.inventory-awesome.io');
Good:
|
|