function collectCompatNotes() {

  function pushNotes(supportEntry, browserName) {
    // collect notes
    if (supportEntry.hasOwnProperty('notes')) {
      let notes = supportEntry['notes'];
      if (Array.isArray(notes)) {
        for (let note of notes) {
          if (notesArray.indexOf(note) === -1) {
            notesArray.push(note);
          }
        }
      } else {
        if (notesArray.indexOf(notes) === -1) {
          notesArray.push(notes);
        }
      }
    }
    // collect flags
    if (supportEntry.hasOwnProperty('flag')) {
      let flagNote = writeFlagsNote(supportEntry, browserName);
      if (notesArray.indexOf(flagNote) === -1) {
        notesArray.push(flagNote);
      }
    }
    // collect alternative names
    if (supportEntry.hasOwnProperty('alternative_name')) {
      let altNameNote = writeAlternativeNameNote(supportEntry.alternative_name);
      if (notesArray.indexOf(altNameNote) === -1) {
        notesArray.push(altNameNote);
      }
    }
  }
  for (let row of features) {
    let support = Object.keys(row).map((k) => row[k])[0].support;
    for (let browserName of Object.keys(support)) {
      if (Array.isArray(support[browserName])) {
        for (let entry of support[browserName]) {
          pushNotes(entry, browserName);
        }
      } else {
        pushNotes(support[browserName], browserName);
      }
    }
  }
  return notesArray;
}
function collectCompatNotes() {

  function pushNotes(supportEntry, browserName) {
    // collect notes
    if (supportEntry.hasOwnProperty('notes')) {
      let notes = supportEntry['notes'];
      if (Array.isArray(notes)) {
        for (let note of notes) {
          if (notesArray.indexOf(note) === -1) {
            notesArray.push(note);
          }
        }
      } else {
        if (notesArray.indexOf(notes) === -1) {
          notesArray.push(notes);
        }
      }
    }
    // collect flags
    if (supportEntry.hasOwnProperty('flag')) {
      let flagNote = writeFlagsNote(supportEntry, browserName);
      if (notesArray.indexOf(flagNote) === -1) {
        notesArray.push(flagNote);
      }
    }
    // collect alternative names
    if (supportEntry.hasOwnProperty('alternative_name')) {
      let altNameNote = writeAlternativeNameNote(supportEntry.alternative_name);
      if (notesArray.indexOf(altNameNote) === -1) {
        notesArray.push(altNameNote);
      }
    }
  }
  for (let row of features) {
    let support = Object.keys(row).map((k) => row[k])[0].support;
    for (let browserName of Object.keys(support)) {
      if (Array.isArray(support[browserName])) {
        for (let entry of support[browserName]) {
          pushNotes(entry, browserName);
        }
      } else {
        pushNotes(support[browserName], browserName);
      }
    }
  }
  return notesArray;
}
function collectCompatNotes ( ) { function pushNotes ( supportEntry , browserName ) { // collect notes if ( supportEntry . hasOwnProperty ( 'notes' ) ) { let notes = supportEntry [ 'notes' ] ; if ( Array . isArray ( notes ) ) { for ( let note of notes ) { if ( notesArray . indexOf ( note ) === - 1 ) { notesArray . push ( note ) ; } } } else { if ( notesArray . indexOf ( notes ) === - 1 ) { notesArray . push ( notes ) ; } } } // collect flags if ( supportEntry . hasOwnProperty ( 'flag' ) ) { let flagNote = writeFlagsNote ( supportEntry , browserName ) ; if ( notesArray . indexOf ( flagNote ) === - 1 ) { notesArray . push ( flagNote ) ; } } // collect alternative names if ( supportEntry . hasOwnProperty ( 'alternative_name' ) ) { let altNameNote = writeAlternativeNameNote ( supportEntry . alternative_name ) ; if ( notesArray . indexOf ( altNameNote ) === - 1 ) { notesArray . push ( altNameNote ) ; } } } for ( let row of features ) { let support = Object . keys ( row ) . map ( ( k ) => row [ k ] ) [ 0 ] . support ; for ( let browserName of Object . keys ( support ) ) { if ( Array . isArray ( support [ browserName ] ) ) { for ( let entry of support [ browserName ] ) { pushNotes ( entry , browserName ) ; } } else { pushNotes ( support [ browserName ] , browserName ) ; } } } return notesArray ; }
/*
Iterate into all "support" objects, and all browsers under them,
and collect all notes in an array, without duplicates.
/ * Iterate into all support objects and all browsers under them and collect all notes in an array without duplicates .
collectCompatNotes - collect notes from supportEntry