code: function hasList(type, state) {
    if (hasMultiLineSelection(state)) {
      for (let i = 0; i < state.texts.size; i++) {
        if (!hasListLine(type, state, i)) {
          return false;
        }
      }
      return true;
    } else {
      return hasListLine(type, state)
    }
  }
docs: Has list selected
  
  @param {string} type - list type
  @param {Object} state - editor state