code: function(options) {
            options = options || {};
            var self = this;
            if (options.eachApp) {
              this.allDesignDocs({
                success: function(resp) {
                  $.each(resp.rows, function() {
                    self.openDoc(this.id, {
                      success: function(ddoc) {
                        var index, appPath, appName = ddoc._id.split('/');
                        appName.shift();
                        appName = appName.join('/');
                        index = ddoc.couchapp && ddoc.couchapp.index;
                        if (index) {
                          appPath = ['', name, ddoc._id, index].join('/');
                        } else if (ddoc._attachments &&
                                   ddoc._attachments["index.html"]) {
                          appPath = ['', name, ddoc._id, "index.html"].join('/');
                        }
                        if (appPath) options.eachApp(appName, appPath, ddoc);
                      }
                    });
                  });
                }
              });
            } else {
              throw 'Please provide an eachApp function for allApps()';
            }
          }
docs: Fetch all the design docs with an index.html, <code>options</code>
  parameter expects an <code>eachApp</code> field which is a callback
  called on each app found.
  @param {ajaxSettings} options <a href="http://api.jquery.com/
  jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>