We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de41864 commit 7da14a1Copy full SHA for 7da14a1
README.md
@@ -48,6 +48,7 @@ app.use(middleware.iff([
48
49
...
50
```
51
+In this example, only a `[POST|DELETE|PUT|PATCH] /tasks/:id` request will cause the middleware to be executed.
52
### Chaining
53
You can optionally chain iff -> unless or vice-versa:
54
```js
@@ -91,7 +92,7 @@ middleware.iff([
91
92
'/login', // if string is passed, the GET method is inferred
93
{
94
methods: ['DELETE', 'POST', '...'],
- url: '/task/:id/*'
95
+ url: '/tasks/:id/*'
96
}
97
])
98
@@ -101,7 +102,7 @@ middleware.unless({ endpoints: [
101
102
103
104
105
106
107
]})
108
0 commit comments