docs: function toChoices(config) {
    return function fn(name, message, options) {
      if (Array.isArray(options)) {
        return fn(name, message, {choices: options});
      }
      if (Array.isArray(message)) {
        return fn(name, {choices: message}, options);
      }
      if (typeof message === 'string') {
        return fn(name, {message: message}, options);
      }
      if (typeof name === 'string') {
        return fn({name: name}, message, options);
      }
  
      var question = merge({type: 'checkbox'}, config, options, message, name);
      if (typeof question.message === 'undefined') {
        question.message = question.name;
      }
  
      /**
       * Generate the list of choices
       */
  
      var choices = [];
      var len = question.choices.length;
      var idx = -1;
  
      // create `all` choice
      if (len > 1 && question.all !== false && question.type === 'checkbox') {
        choices.unshift({line: question.separator || gray('·······'), type: 'separator'});
        choices.unshift({name: 'all', value: question.choices.slice()});
      }
  
      while (++idx < len) {
        var ele = question.choices[idx];
        ele = toItem(ele);
        choices.push(ele);
      }
  
      question.choices = choices;
      return question;
    };
  }