index.js
function makeHelper(obj, verb) {
  obj[verb] = function helper(url, options, f) {
    // ('url')
    if(_.isString(url)){
      // ('url', f)
      if(_.isFunction(options)){
        f = options;
      }

      if(!_.isObject(options)){
        options = {};
      }

      // ('url', {object})
      options.url = url;
    }

    if(_.isObject(url)){
      if(_.isFunction(options)){
        f = options;
      }
      options = url;
    }

    options.method = verb.toUpperCase();
    return obj(options, f);
  };
}
function makeHelper(obj, verb) {
  obj[verb] = function helper(url, options, f) {
    // ('url')
    if(_.isString(url)){
      // ('url', f)
      if(_.isFunction(options)){
        f = options;
      }

      if(!_.isObject(options)){
        options = {};
      }

      // ('url', {object})
      options.url = url;
    }

    if(_.isObject(url)){
      if(_.isFunction(options)){
        f = options;
      }
      options = url;
    }

    options.method = verb.toUpperCase();
    return obj(options, f);
  };
}
function makeHelper ( obj , verb ) { obj [ verb ] = function helper ( url , options , f ) { // ('url') if ( _ . isString ( url ) ) { // ('url', f) if ( _ . isFunction ( options ) ) { f = options ; } if ( ! _ . isObject ( options ) ) { options = { } ; } // ('url', {object}) options . url = url ; } if ( _ . isObject ( url ) ) { if ( _ . isFunction ( options ) ) { f = options ; } options = url ; } options . method = verb . toUpperCase ( ) ; return obj ( options , f ) ; } ; }
adds a helper for HTTP method `verb` to object `obj`
adds a helper for HTTP method verb to object obj