node_modules/snyk/dist/cli/139.index.js
/**
 * Function for rendering list choices
 * @param  {Number} pointer Position of the pointer
 * @return {String}         Rendered content
 */
Function for rendering list choices
@param  {Number} pointer Position of the pointer
@return {String}         Rendered content
Function for rendering list choices @param { Number } pointer Position of the pointer @return { String } Rendered content
function renderChoices(choices, pointer) {
  var output = '';
  var separatorOffset = 0;
  choices.forEach(function (choice, i) {
    output += '\n  ';
    if (choice.type === 'separator') {
      separatorOffset++;
      output += ' ' + choice;
      return;
    }
    var index = i - separatorOffset;
    var display = index + 1 + ') ' + choice.name;
    if (index === pointer) {
      display = chalk.cyan(display);
    }
    output += display;
  });
  return output;
}
function renderChoices ( choices , pointer ) { var output = '' ; var separatorOffset = 0 ; choices . forEach ( function ( choice , i ) { output += '\n  ' ; if ( choice . type === 'separator' ) { separatorOffset ++ ; output += ' ' + choice ; return ; } var index = i - separatorOffset ; var display = index + 1 + ') ' + choice . name ; if ( index === pointer ) { display = chalk . cyan ( display ) ; } output += display ; } ) ; return output ; }
Function for rendering list choices
 @param  {Number} pointer Position of the pointer
 @return {String}         Rendered content
Function for rendering list choices @param { Number } pointer Position of the pointer @return { String } Rendered content