lib/clean.js
function(array) {
    let sorted = array.sort((a, b) => {
      return a.id - b.id;
    });
    let i = sorted.length - 1;
    while (i--)
      if (sorted[i + 1].id === sorted[i].id)
        sorted.splice(i,1);

    return sorted;
  }
function(array) {
    let sorted = array.sort((a, b) => {
      return a.id - b.id;
    });
    let i = sorted.length - 1;
    while (i--)
      if (sorted[i + 1].id === sorted[i].id)
        sorted.splice(i,1);

    return sorted;
  }
function ( array ) { let sorted = array . sort ( ( a , b ) => { return a . id - b . id ; } ) ; let i = sorted . length - 1 ; while ( i -- ) if ( sorted [ i + 1 ] . id === sorted [ i ] . id ) sorted . splice ( i , 1 ) ; return sorted ; }
removes duplicate texts from an array of libgen json objects
removes duplicate texts from an array of libgen json objects