code: function getDocWithDefault(db, id, defaultDoc) {
    return db.get(id).catch(function (err) {
      /* istanbul ignore if */
      if (err.status !== 404) {
        throw err;
      }
      defaultDoc._id = id;
      return db.put(defaultDoc).catch(function (err) {
        /* istanbul ignore if */
        if (err.status !== 409) { // conflict
          throw err;
        }
      }).then(function () {
        return db.get(id);
      });
    });
  }
docs: Create the doc if it doesn't exist