Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

Commit 752d4b9

Browse files
committed
Add support comments
1 parent eb74f0d commit 752d4b9

2 files changed

Lines changed: 27 additions & 3 deletions

File tree

lib/index.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,42 @@ class Maker {
8383
this.local(method, listeners)
8484
}
8585

86+
/**
87+
* @param {string} [name]
88+
* @param {...function[]} listeners
89+
*/
8690
post(...listeners) {
8791
this.method('POST', listeners)
8892
}
93+
94+
/**
95+
* @param {string} [name]
96+
* @param {...function[]} listeners
97+
*/
8998
get(...listeners) {
9099
this.method('GET', listeners)
91100
}
101+
102+
/**
103+
* @param {string} [name]
104+
* @param {...function[]} listeners
105+
*/
92106
put(...listeners) {
93107
this.method('PUT', listeners)
94108
}
109+
110+
/**
111+
* @param {string} [name]
112+
* @param {...function[]} listeners
113+
*/
95114
delete(...listeners) {
96115
this.method('DELETE', listeners)
97116
}
117+
118+
/**
119+
* @param {string} [name]
120+
* @param {...function[]} listeners
121+
*/
98122
patch(...listeners) {
99123
this.method('PATCH', listeners)
100124
}

lib/index.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ test('After', t => {
4646
test('Methods', t => {
4747
t.deepEqual(
4848
createRest(r => {
49-
r.get('/', get)
50-
r.post('/', post)
51-
r.put('/', put)
49+
r.get(get)
50+
r.post(post)
51+
r.put(put)
5252
r.patch('/', patch)
5353
r.delete('/', destroy)
5454
}),

0 commit comments

Comments
 (0)