lib/core/index.js
function getResponder( req, res ) {

	return function ( code, body, contentType ) {

		if ( code !== 200 ) {
			body = "";
			contentType = "text/html; charset=utf-8";
		}

		if ( !contentType ) {
			contentType = "text/html; charset=utf-8";
		}

		res.writeHead( code, {
			"Content-type": contentType
		} );

		res.end( body );

	};
}
function getResponder( req, res ) {

	return function ( code, body, contentType ) {

		if ( code !== 200 ) {
			body = "";
			contentType = "text/html; charset=utf-8";
		}

		if ( !contentType ) {
			contentType = "text/html; charset=utf-8";
		}

		res.writeHead( code, {
			"Content-type": contentType
		} );

		res.end( body );

	};
}
function getResponder ( req , res ) { return function ( code , body , contentType ) { if ( code !== 200 ) { body = "" ; contentType = "text/html; charset=utf-8" ; } if ( ! contentType ) { contentType = "text/html; charset=utf-8" ; } res . writeHead ( code , { "Content-type" : contentType } ) ; res . end ( body ) ; } ; }
Gets a response generating function. Used in middleware to simplify response logic.

@param res A handle to a response object to send the response to when the responder function is called
@return {Function} The responder function for middleware to call to send a response to a request
Gets a response generating function . Used in middleware to simplify response logic .