duplicate-id-after.js 249 B

123456789101112
  1. function duplicateIdAfter(results) {
  2. var uniqueIds = [];
  3. return results.filter(r => {
  4. if (uniqueIds.indexOf(r.data) === -1) {
  5. uniqueIds.push(r.data);
  6. return true;
  7. }
  8. return false;
  9. });
  10. }
  11. export default duplicateIdAfter;