Skip to content

Commit

Permalink
module doc headers for server classes
Browse files Browse the repository at this point in the history
router, route, response, request
  • Loading branch information
esatterwhite committed Jan 4, 2017
1 parent fa12e75 commit 791ef1b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
7 changes: 7 additions & 0 deletions lib/server/request.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
'use strict';
/**
* Simple wrapper around the http request object to avoid deopts
* @module skyring/lib/server/request
* @author Eric Satterwhite
* @since 1.0.0
* @requires url
*/

const {Url} = require('url')
, cache = new WeakMap()
Expand Down
6 changes: 6 additions & 0 deletions lib/server/response.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
'use strict'
/**
* Simple wrapper around the http response object to avoid deopts
* @module skyring/lib/server/response
* @author Eric Satterwhite
* @since 1.0.0
*/

function Response( res ) {
this.res = res
Expand Down
7 changes: 7 additions & 0 deletions lib/server/route.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
'use strict';
/**
* represents the middleware stack for a url / method combination
* @module skyring/lib/server/route
* @author Eric Satterwhite
* @since 1.0.0
* @requires path-to-regexp
*/

const pathToRegExp = require('path-to-regexp');

Expand Down
6 changes: 4 additions & 2 deletions lib/server/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ const Route = require('./route')
/**
* @constructor
* @alias module:skyring/lib/server/router
* @param {module:skyring/lib/server/node} node The node linked to the application hashring
* @example var x = new Router(node)
* @param {module:skyring/lib/server/node} node The node linked to the application hashring to pass with each request
* @param {module:skyring/lib/timers} timers A timer instance associated with the application hashring to pass with each request
* @example var x = new Router(node, timers)
router.handle(req, res)
*/
function Router( node, timers ) {
this.routes = new Map();
Expand Down

0 comments on commit 791ef1b

Please sign in to comment.