UNPKG

luhn-generator

Version:

A generator of numbers that passes the validation of Luhn algorithm or Luhn formula, also known as the 'modulus 10' or 'mod 10' algorithm

13 lines (11 loc) 241 B
function duplicateIdAfter(results) { var uniqueIds = []; return results.filter(function(r) { if (uniqueIds.indexOf(r.data) === -1) { uniqueIds.push(r.data); return true; } return false; }); } export default duplicateIdAfter;