smart404

1.0.3 • Public • Published

smart404

Make your error pages smart! Redirect users who made a typo automatically!

Usage:

const smart404 = require("smart404");
app.use(smart404(app, {
  distance: .8, //80% or more similar to an actual route.
  methods: ["GET"], //Methods to redirect
  status: 302, //Status to send
  ignoreRoutes: [], //Ignore these routes
}));//Must go BEFORE any other routes

It's that simple!

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    1
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i smart404

Weekly Downloads

1

Version

1.0.3

License

GPL-3.0

Unpacked Size

5.72 kB

Total Files

4

Last publish

Collaborators

  • --explosion--