golubvladimir
10/3/2019 - 11:36 AM

Удаделение повторов #tools

Удаделение повторов #tools

/*
	state - old array
    newValues - new array
*/

function removeRepetition(state, newValues) {
   return newValues.filter(item => {
       return !state.find(x => x.id === item.id);
   });
}