MCPcopy Create free account
hub / github.com/breck7/scroll / getNumRawDataModules

Method getNumRawDataModules

external/.qrcodegen.js:223–231  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

221 }
222 }
223 static getNumRawDataModules(t) {
224 if (t < e.MIN_VERSION || t > e.MAX_VERSION) throw new RangeError("Version number out of range")
225 let r = (16 * t + 128) * t + 64
226 if (t >= 2) {
227 const e = Math.floor(t / 7) + 2
228 ;(r -= (25 * e - 10) * e - 55), t >= 7 && (r -= 36)
229 }
230 return o(208 <= r && r <= 29648), r
231 }
232 static getNumDataCodewords(t, r) {
233 return Math.floor(e.getNumRawDataModules(t) / 8) - e.ECC_CODEWORDS_PER_BLOCK[r.ordinal][t] * e.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][t]
234 }

Callers 3

addEccAndInterleaveMethod · 0.80
drawCodewordsMethod · 0.80
getNumDataCodewordsMethod · 0.80

Calls 1

oFunction · 0.70

Tested by

no test coverage detected