code: function cleanDocs(docs) {
    for (var i = 0; i < docs.length; i++) {
      var doc = docs[i];
      if (doc._deleted) {
        delete doc._attachments; // ignore atts for deleted docs
      } else if (doc._attachments) {
        // filter out extraneous keys from _attachments
        var atts = Object.keys(doc._attachments);
        for (var j = 0; j < atts.length; j++) {
          var att = atts[j];
          doc._attachments[att] = pouchdbUtils.pick(doc._attachments[att],
            ['data', 'digest', 'content_type', 'length', 'revpos', 'stub']);
        }
      }
    }
  }
docs: clean docs given to us by the user