services/pypi/pypi-helpers.js
function parseClassifiers(parsedData, pattern) {
  const results = []
  for (let i = 0; i < parsedData.info.classifiers.length; i++) {
    const matched = pattern.exec(parsedData.info.classifiers[i])
    if (matched && matched[1]) {
      results.push(matched[1].toLowerCase())
    }
  }
  return results
}
function parseClassifiers(parsedData, pattern) {
  const results = []
  for (let i = 0; i < parsedData.info.classifiers.length; i++) {
    const matched = pattern.exec(parsedData.info.classifiers[i])
    if (matched && matched[1]) {
      results.push(matched[1].toLowerCase())
    }
  }
  return results
}
function parseClassifiers ( parsedData , pattern ) { const results = [ ] for ( let i = 0 ; i < parsedData . info . classifiers . length ; i ++ ) { const matched = pattern . exec ( parsedData . info . classifiers [ i ] ) if ( matched && matched [ 1 ] ) { results . push ( matched [ 1 ] . toLowerCase ( ) ) } } return results }
Extract classifiers from a pypi json response based on a regex.
Extract classifiers from a pypi json response based on a regex .