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

24 lines (18 loc) 459 B
delete Object.freeze; var html = require('../cjs'); console.assert( html.escape('&<>\'"') === '&amp;&lt;&gt;&#39;&quot;', 'correct escape' ); console.assert( html.escape('<>\'"&') === '&lt;&gt;&#39;&quot;&amp;', 'correct inverted escape' ); console.assert( '&<>\'"' === html.unescape('&amp;&lt;&gt;&#39;&quot;'), 'correct unescape' ); console.assert( '<>\'"&' === html.unescape('&lt;&gt;&#39;&quot;&amp;'), 'correct inverted unescape' );