code: function(doc) {
        if (!this.isValid(doc)) {
          return Promise.resolve(false);
        }
  
        var props = pick(doc, this._uniq);
        if (!Object.keys(props).length) {
          return Promise.resolve(true);
        }
  
        return this._dbApi.isAdmissible(doc, props);
      }
docs: Check if a proposed document is admissible into the database
  
  A document is admissible if it passes the valid predicate, and no other
  document in the database is already using its unique keys.
  
  @param {Object} doc - a document to test
  @return {Promise}