lib/timbits.js
function allowedMethods(methods) {
  // default values
  var methodsAllowed = { 'GET': true, 'POST': false, 'PUT': false, 'HEAD': false, 'DELETE': false  };
  // check and override if one of the default methods
  for (var key in methods) {
    var newKey = key.toUpperCase();
    if ( methodsAllowed[newKey]!=undefined) {
      methodsAllowed[newKey] = Boolean(methods[key]);
    }
  }
  return methodsAllowed;
}
function allowedMethods(methods) {
  // default values
  var methodsAllowed = { 'GET': true, 'POST': false, 'PUT': false, 'HEAD': false, 'DELETE': false  };
  // check and override if one of the default methods
  for (var key in methods) {
    var newKey = key.toUpperCase();
    if ( methodsAllowed[newKey]!=undefined) {
      methodsAllowed[newKey] = Boolean(methods[key]);
    }
  }
  return methodsAllowed;
}
function allowedMethods ( methods ) { // default values var methodsAllowed = { 'GET' : true , 'POST' : false , 'PUT' : false , 'HEAD' : false , 'DELETE' : false } ; // check and override if one of the default methods for ( var key in methods ) { var newKey = key . toUpperCase ( ) ; if ( methodsAllowed [ newKey ] != undefined ) { methodsAllowed [ newKey ] = Boolean ( methods [ key ] ) ; } } return methodsAllowed ; }
generates the allowed methods
generates the allowed methods