Удаделение повторов #tools
/* state - old array newValues - new array */ function removeRepetition(state, newValues) { return newValues.filter(item => { return !state.find(x => x.id === item.id); }); }