Middleware if/unless
JSON →middleware-if-unless is a Node.js library that provides conditional execution of connect-like middleware based on routing criteria. Inspired by the popular `express-unless` module, it aims for higher performance by leveraging `find-my-way` for advanced route matching capabilities. It allows developers to define rules for when a middleware should (`iff`) or should not (`unless`) be applied to an incoming request, supporting various matching criteria like methods, URLs, functions, and even `Accept-Version` headers. The package ships with TypeScript types, promoting better developer experience and type safety. Currently at version 1.6.0, it maintains an active release cadence, with recent updates focusing on performance optimizations and dependency updates.
Traffic · last 30 days ↓50% vs prev 7d
top countries 🇨🇦 Canada · 🇺🇸 United States · 🇫🇮 Finland · 🇸🇬 Singapore · 🇩🇪 Germany