needed this for some of my own websites so I made my very first npm library today :)
the idea is pretty simple but useful - if a user lands on your website and encounters a 404, this uses a basic fuzzy URL matching to redirect to the closest valid URL
very low effort to set up, just 46kb, no dependencies and I'm quite happy with it !
happy to hear feedback/ potential improvements
https://www.npmjs.com/package/fuzzy-redirect
https://github.com/Kuberwastaken/fuzzy-redirect