function toggleFiles(elementList, regex) {
  var hiddenFiles = []
  for (elementPos = elementList.length - 1; elementPos >= 0; elementPos--) {
    let element = elementList[elementPos]
    if (element.className !== 'stickyArea') {
      continue
    }

    let filePath = JSON.parse(element.children[0].getAttribute('data-file'))
      .path

    if (regex.test(filePath)) {
      hiddenFiles.push(filePath)
      element.hidden = !element.hidden
    }
  }

  return hiddenFiles
}
/**
 * toggleFiles: flips the hidden state for any file in the current patch set that matches the provided regex filter.
 * @param {HTMLCollection} elementList An HTMLCollection containing children elements which hold information about the files modified in the current patch set.
 * @param {RegExp} regex A regex filter to filter a list of files on.
 * @return {Array<string>} An array containing the file names that have been toggled by the filter.
 */
flips the hidden state for any file in the current patch set that matches the provided regex filter.
@param {HTMLCollection} elementList An HTMLCollection containing children elements which hold information about the files modified in the current patch set.
@param {RegExp} regex A regex filter to filter a list of files on.
@return {Array} An array containing the file names that have been toggled by the filter.
flips the hidden state for any file in the current patch set that matches the provided regex filter . @param { HTMLCollection } elementList An HTMLCollection containing children elements which hold information about the files modified in the current patch set . @param { RegExp } regex A regex filter to filter a list of files on . @return { Array } An array containing the file names that have been toggled by the filter .
function toggleFiles(elementList, regex) {
  var hiddenFiles = []
  for (elementPos = elementList.length - 1; elementPos >= 0; elementPos--) {
    let element = elementList[elementPos]
    if (element.className !== 'stickyArea') {
      continue
    }
    let filePath = JSON.parse(element.children[0].getAttribute('data-file'))
      .path
    if (regex.test(filePath)) {
      hiddenFiles.push(filePath)
      element.hidden = !element.hidden
    }
  }
  return hiddenFiles
}
function toggleFiles ( elementList , regex ) { var hiddenFiles = [ ] for ( elementPos = elementList . length - 1 ; elementPos >= 0 ; elementPos -- ) { let element = elementList [ elementPos ] if ( element . className !== 'stickyArea' ) { continue } let filePath = JSON . parse ( element . children [ 0 ] . getAttribute ( 'data-file' ) ) . path if ( regex . test ( filePath ) ) { hiddenFiles . push ( filePath ) element . hidden = ! element . hidden } } return hiddenFiles }
toggleFiles: flips the hidden state for any file in the current patch set that matches the provided regex filter.
toggleFiles : flips the hidden state for any file in the current patch set that matches the provided regex filter .