let Duparr=[[1,2,1],[1,2,1],[2,1,2],[3,1,4],[4,1,1]]
console.log(removeDup(Duparr))
function removeDup(arr){
return [...new Set(arr.join('|').split('|'))].map(v=>v.split(',')).map(v=>v.map(a=>+a))
}
//[ [ 1, 2, 1 ], [ 2, 1, 2 ], [ 3, 1, 4 ], [ 4, 1, 1 ] ]