code: function headDoc (docName, callback) {
        if (callback) {
          relax({
            db: dbName,
            doc: docName,
            method: 'HEAD',
            qs: {}
          }, callback)
        } else {
          // this function doesn't pass on the Promise from relax because it needs
          // to return the headers when resolving the Promise
          return new Promise(function (resolve, reject) {
            relax({
              db: dbName,
              doc: docName,
              method: 'HEAD',
              qs: {}
            }, function (err, body, headers) {
              if (err) {
                reject(err)
              } else {
                resolve(headers)
              }
            })
          })
        }
      }
docs: http://docs.couchdb.org/en/latest/api/document/common.html#head--db-docid