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

	var path = req.path.replace( /\..*$/, '' ).replace( /\//g, '.' ).replace( /^\.conf/, '' ).replace( /\.$/, '' ).trim();

	if ( path.length < 1 ) {
		path = null;
	}

	var outputFilter = req.path.trim().match( /\.(.*)$/ );
	if ( outputFilter ) {
		outputFilter = outputFilter[1].trim();
	}

	if ( typeof outputFilter !== 'string' || outputFilter.length < 1 ) {
		outputFilter = 'json';
	}

	req.confPath = path;
	req.outputFilter = outputFilter;

	return next();

}
function getPath( req, res, next ) {

	var path = req.path.replace( /\..*$/, '' ).replace( /\//g, '.' ).replace( /^\.conf/, '' ).replace( /\.$/, '' ).trim();

	if ( path.length < 1 ) {
		path = null;
	}

	var outputFilter = req.path.trim().match( /\.(.*)$/ );
	if ( outputFilter ) {
		outputFilter = outputFilter[1].trim();
	}

	if ( typeof outputFilter !== 'string' || outputFilter.length < 1 ) {
		outputFilter = 'json';
	}

	req.confPath = path;
	req.outputFilter = outputFilter;

	return next();

}
function getPath ( req , res , next ) { var path = req . path . replace ( / \..*$ / , '' ) . replace ( / \/ / g , '.' ) . replace ( / ^\.conf / , '' ) . replace ( / \.$ / , '' ) . trim ( ) ; if ( path . length < 1 ) { path = null ; } var outputFilter = req . path . trim ( ) . match ( / \.(.*)$ / ) ; if ( outputFilter ) { outputFilter = outputFilter [ 1 ] . trim ( ) ; } if ( typeof outputFilter !== 'string' || outputFilter . length < 1 ) { outputFilter = 'json' ; } req . confPath = path ; req . outputFilter = outputFilter ; return next ( ) ; }
Get the conf path from the URL path.

@param req The express request handle
@param res The response object passed to the middleware
@param next The next function to trigger the next middleware
@return {null}
Get the conf path from the URL path .