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 (10 loc) 433 B
import { querySelectorAll } from '../../core/utils'; function captionEvaluate(node, options, virtualNode) { const tracks = querySelectorAll(virtualNode, 'track'); const hasCaptions = tracks.some(vNode => { return (vNode.attr('kind') || '').toLowerCase() === 'captions'; }); // Undefined if there are no tracks - media may use another caption method return hasCaptions ? false : undefined; } export default captionEvaluate;