Eexpressjs

expressjs/route-del-to-delete

Migrates usage of the legacy APIs `app.del()` to `app.delete()`

transformationmigrationexpressredirectlocation
Public
0 executions
1 stars
How to Use
Run this codemod on your codebase using one of the following commands

The easiest way to run this codemod without installing anything globally:

Documentation

Migrate legacy app.del() to app.delete()

Migrates usage of the legacy APIs app.del() to app.delete().
Initially, del was used instead of delete, because delete is a reserved keyword in JavaScript. However, as of ECMAScript 6, delete and other reserved keywords can legally be used as property names. The app.del() method was deprecated in Express 4 and removed in Express 5.

Example

Migrating app.del()

The migration involves replacing instances of app.del() with app.delete().

diff

References

Ready to contribute?

Build your own codemod and share it with the community.