MCPcopy Index your code
hub / github.com/codemistic/Web-Development / r

Function r

QR-Code Generator/qrcode.js:33–54  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

31 }
32
33 function r(a, b) {
34 for (var c = 1, e = s(a), f = 0, g = l.length; g >= f; f++) {
35 var h = 0;
36 switch (b) {
37 case d.L:
38 h = l[f][0];
39 break;
40 case d.M:
41 h = l[f][1];
42 break;
43 case d.Q:
44 h = l[f][2];
45 break;
46 case d.H:
47 h = l[f][3]
48 }
49 if (h >= e) break;
50 c++
51 }
52 if (c > l.length) throw new Error("Too long data");
53 return c
54 }
55
56 function s(a) { var b = encodeURI(a).toString().replace(/\%[0-9a-fA-F]{2}/g, "a"); return b.length + (b.length != a ? 3 : 0) }
57 a.prototype = { getLength: function() { return this.parsedData.length }, write: function(a) { for (var b = 0, c = this.parsedData.length; c > b; b++) a.put(this.parsedData[b], 8) } }, b.prototype = {

Callers 1

qrcode.jsFile · 0.70

Calls 1

sFunction · 0.70

Tested by

no test coverage detected