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
16 lines (13 loc) • 331 B
JavaScript
function labelMatches(node, virtualNode) {
if (
virtualNode.props.nodeName !== 'input' ||
virtualNode.hasAttr('type') === false
) {
return true;
}
var type = virtualNode.attr('type').toLowerCase();
return (
['hidden', 'image', 'button', 'submit', 'reset'].includes(type) === false
);
}
export default labelMatches;