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
20 lines (17 loc) • 569 B
JavaScript
import labelVirtual from './label-virtual';
import { getNodeFromTree } from '../../core/utils';
/**
* Finds virtual node and calls labelVirtual()
* IMPORTANT: This method requires the composed tree at axe._tree
* @see axe.commons.text.virtualLabel
* @method label
* @memberof axe.commons.text
* @instance
* @param {Element} node The virtual node mapping to the input to test
* @return {Mixed} String of visible text, or `null` if no label is found
*/
function label(node) {
node = getNodeFromTree(node);
return labelVirtual(node);
}
export default label;