File tree 3 files changed +5
-2
lines changed
3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ unreleased
3
3
4
4
* Remove ` Object.setPrototypeOf ` polyfill
5
5
* Use ` Array.flat ` instead of ` array-flatten ` package
6
+ * Replace ` methods ` dependency with standard library
6
7
7
8
2.0.0 / 2024-09-09
8
9
==================
Original file line number Diff line number Diff line change 13
13
*/
14
14
15
15
const Layer = require ( './layer' )
16
- const methods = require ( 'methods ' )
16
+ const { METHODS } = require ( 'node:http ' )
17
17
18
18
/**
19
19
* Module variables.
@@ -215,6 +215,9 @@ Route.prototype.all = function all (handler) {
215
215
return this
216
216
}
217
217
218
+
219
+ const methods = METHODS . map ( ( method ) => method . toLowerCase ( ) )
220
+
218
221
methods . forEach ( function ( method ) {
219
222
Route . prototype [ method ] = function ( handler ) {
220
223
const callbacks = flatten . call ( slice . call ( arguments ) , Infinity )
Original file line number Diff line number Diff line change 10
10
"repository" : " pillarjs/router" ,
11
11
"dependencies" : {
12
12
"is-promise" : " 4.0.0" ,
13
- "methods" : " ~1.1.2" ,
14
13
"parseurl" : " ~1.3.3" ,
15
14
"path-to-regexp" : " ^8.0.0" ,
16
15
"utils-merge" : " 1.0.1"
You can’t perform that action at this time.
0 commit comments