generate-changelog.js
function getWeight(labels, labelWeight) {
  const places = labels.map(label => labelWeight.indexOf(label.name));
  let binary = '';
  for (let i = 0; i < labelWeight.length; i++) {
    binary += places.includes(i) ? '1' : '0';
  }
  return parseInt(binary, 2);
}
function getWeight(labels, labelWeight) {
  const places = labels.map(label => labelWeight.indexOf(label.name));
  let binary = '';
  for (let i = 0; i < labelWeight.length; i++) {
    binary += places.includes(i) ? '1' : '0';
  }
  return parseInt(binary, 2);
}
function getWeight ( labels , labelWeight ) { const places = labels . map ( label => labelWeight . indexOf ( label . name ) ) ; let binary = '' ; for ( let i = 0 ; i < labelWeight . length ; i ++ ) { binary += places . includes ( i ) ? '1' : '0' ; } return parseInt ( binary , 2 ) ; }
Calculates the weight of a given array of labels
Calculates the weight of a given array of labels