function generateUUID(value, namespace, buf, offset) {
    if (typeof value === 'string') {
      value = stringToBytes$1(value);
    }

    if (typeof namespace === 'string') {
      namespace = parse$5(namespace);
    }

    if (namespace.length !== 16) {
      throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
    } // Compute hash of namespace and value, Per 4.3
    // Future: Use spread syntax when supported on all platforms, e.g. `bytes =
    // hashfunc([...namespace, ... value])`


    var bytes = new Uint8Array(16 + value.length);
    bytes.set(namespace);
    bytes.set(value, namespace.length);
    bytes = hashfunc(bytes);
    bytes[6] = bytes[6] & 0x0f | version;
    bytes[8] = bytes[8] & 0x3f | 0x80;

    if (buf) {
      offset = offset || 0;

      for (var i = 0; i < 16; ++i) {
        buf[offset + i] = bytes[i];
      }

      return buf;
    }

    return stringify$4(bytes);
  } // Function#name is not settable on some platforms (#270)
Define EAN Lenghts; 8 for EAN-8; 13 for EAN-13; 14 for EAN-14
and Regular Expression for valid EANs (EAN-8, EAN-13, EAN-14),
with exact numberic matching of 8 or 13 or 14 digits [0-9]