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

12 lines (11 loc) 402 B
/** * Extractor function for an ArrayExpression type value node. * An array expression is an expression with [] syntax. * * @returns - An array of the extracted elements. */ export default function extractValueFromArrayExpression(value) { // eslint-disable-next-line global-require const getValue = require('./index.js').default; return value.elements.map((element) => getValue(element)); }