bin/util.js
/**
 * Check if the request is not null and has 4 or 5 parameters.
 * @param request request received.
 * @returns {boolean} ture if valid, false otherwise.
 */
Check if the request is not null and has 4 or 5 parameters.
@param request request received.
@returns {boolean} ture if valid, false otherwise.
Check if the request is not null and has 4 or 5 parameters . @param request request received . @returns { boolean } ture if valid false otherwise .
function isRequestValid(request) {
    var match = request.match(dataRegex);
    if (match !== null && (match.length === 4 || match.length === 5)) {
       return true;
    }
    return false;
}
function isRequestValid ( request ) { var match = request . match ( dataRegex ) ; if ( match !== null && ( match . length === 4 || match . length === 5 ) ) { return true ; } return false ; }
Check if the request is not null and has 4 or 5 parameters.
Check if the request is not null and has 4 or 5 parameters .