code: function yankError(callback) {
    return function (err, results) {
      if (err || (results[0] && results[0].error)) {
        callback(err || results[0]);
      } else {
        callback(null, results.length ? results[0]  : results);
      }
    };
  }
docs: Wrapper for functions that call the bulkdocs api with a single doc, if the first result is an error, return an error