Middleware if/unless

JSON →
library 1.6.0 ·javascript
verified May 27, 2026

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.

total hits 37
actors 10 distinct systems
last hit 2d ago human
Amazonbot
4
MetaBot
4
GPTBot
2
Script
1
ByteDance
1
ClaudeBot
1
Search engines
2
Humans
3

top countries 🇨🇦 Canada · 🇺🇸 United States · 🇫🇮 Finland · 🇸🇬 Singapore · 🇩🇪 Germany