Skip to content

Commit 83570fe

Browse files
committed
docs: provide better jsdoc for main function
1 parent db6061a commit 83570fe

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

index.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,12 @@ var onHeaders = require('on-headers')
2525
module.exports = timeout
2626

2727
/**
28-
* Timeout:
28+
* Create a new timeout middleware.
2929
*
30-
* See README.md for documentation.
31-
*
32-
* @param {Number} time
33-
* @param {Object} options
34-
* @return {Function} middleware
30+
* @param {number|string} time The timeout as a number of milliseconds or a string for `ms`
31+
* @param {object} [options] Additional options for middleware
32+
* @param {boolean} [options.respond=true] Automatically emit error when timeout reached
33+
* @return {function} middleware
3534
* @public
3635
*/
3736

0 commit comments

Comments
 (0)