/var/www/greso.tech/server/nsm/node_modules/qrcode/lib/core
NameSizeModeActions
alignment-pattern.js29960644editdlrm
alphanumeric-data.js18220644editdlrm
bit-buffer.js7190644editdlrm
bit-matrix.js15010644editdlrm
byte-data.js6850644editdlrm
error-correction-code.js34150755editdlrm
error-correction-level.js8930644editdlrm
finder-pattern.js5990644editdlrm
format-info.js11260644editdlrm
galois-field.js18990644editdlrm
kanji-data.js15840644editdlrm
mask-pattern.js61010644editdlrm
mode.js39830644editdlrm
numeric-data.js12110644editdlrm
polynomial.js15890644editdlrm
qrcode.js151280644editdlrm
reed-solomon-encoder.js16250644editdlrm
regex.js10840644editdlrm
segments.js93310644editdlrm
utils.js16210644editdlrm
version-check.js2680644editdlrm
version.js49280755editdlrm
Edit: /var/www/greso.tech/server/nsm/node_modules/qrcode/lib/core/utils.js (1621B)
let toSJISFunction const CODEWORDS_COUNT = [ 0, // Not used 26, 44, 70, 100, 134, 172, 196, 242, 292, 346, 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085, 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185, 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706 ] /** * Returns the QR Code size for the specified version * * @param {Number} version QR Code version * @return {Number} size of QR code */ exports.getSymbolSize = function getSymbolSize (version) { if (!version) throw new Error('"version" cannot be null or undefined') if (version < 1 || version > 40) throw new Error('"version" should be in range from 1 to 40') return version * 4 + 17 } /** * Returns the total number of codewords used to store data and EC information. * * @param {Number} version QR Code version * @return {Number} Data length in bits */ exports.getSymbolTotalCodewords = function getSymbolTotalCodewords (version) { return CODEWORDS_COUNT[version] } /** * Encode data with Bose-Chaudhuri-Hocquenghem * * @param {Number} data Value to encode * @return {Number} Encoded value */ exports.getBCHDigit = function (data) { let digit = 0 while (data !== 0) { digit++ data >>>= 1 } return digit } exports.setToSJISFunction = function setToSJISFunction (f) { if (typeof f !== 'function') { throw new Error('"toSJISFunc" is not a valid function.') } toSJISFunction = f } exports.isKanjiModeEnabled = function () { return typeof toSJISFunction !== 'undefined' } exports.toSJIS = function toSJIS (kanji) { return toSJISFunction(kanji) }