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

14 lines (11 loc) 294 B
function uniqueFrameTitleAfter(results) { var titles = {}; results.forEach(function(r) { titles[r.data] = titles[r.data] !== undefined ? ++titles[r.data] : 0; }); results.forEach(function(r) { r.result = !!titles[r.data]; }); return results; } export default uniqueFrameTitleAfter;