fp.js
function(list){
    const listNoDuplicate = difference([],list);
    if(typeof list[0] == "number") {
      return listNoDuplicate.sort((a,b)=>a-b);
    }

    return listNoDuplicate.sort();
  }
function(list){
    const listNoDuplicate = difference([],list);
    if(typeof list[0] == "number") {
      return listNoDuplicate.sort((a,b)=>a-b);
    }

    return listNoDuplicate.sort();
  }
function ( list ) { const listNoDuplicate = difference ( [ ] , list ) ; if ( typeof list [ 0 ] == "number" ) { return listNoDuplicate . sort ( ( a , b ) => a - b ) ; } return listNoDuplicate . sort ( ) ; }
Returns sorted array without duplicates
@param list {Array} array to be sorted
@returns {Array} sorted array
Returns sorted array without duplicates