@agoric/xsnap 0.14.3-u14.0 → 0.14.3-u16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/README.md +3 -3
  2. package/api.js +4 -2
  3. package/build.env +1 -1
  4. package/moddable/modules/data/base64/base64.js +28 -0
  5. package/moddable/modules/data/base64/manifest.json +11 -0
  6. package/moddable/modules/data/base64/modBase64.c +188 -0
  7. package/moddable/modules/data/binaryMessage/BinaryMessage.js +106 -0
  8. package/moddable/modules/data/crc/crc.c +205 -0
  9. package/moddable/modules/data/crc/crc.js +36 -0
  10. package/moddable/modules/data/crc/manifest.json +8 -0
  11. package/moddable/modules/data/hex/hex.js +28 -0
  12. package/moddable/modules/data/hex/manifest.json +11 -0
  13. package/moddable/modules/data/hex/modHex.c +139 -0
  14. package/moddable/modules/data/logical/logical.js +32 -0
  15. package/moddable/modules/data/logical/modLogical.c +98 -0
  16. package/moddable/modules/data/qrcode/manifest.json +9 -0
  17. package/moddable/modules/data/qrcode/qrcode.c +93 -0
  18. package/moddable/modules/data/qrcode/qrcode.js +23 -0
  19. package/moddable/modules/data/qrcode/qrcodegen.c +1025 -0
  20. package/moddable/modules/data/qrcode/qrcodegen.h +267 -0
  21. package/moddable/modules/data/text/decoder/manifest.json +8 -0
  22. package/moddable/modules/data/text/decoder/textdecoder.c +480 -0
  23. package/moddable/modules/data/text/decoder/textdecoder.js +27 -0
  24. package/moddable/modules/data/text/encoder/manifest.json +8 -0
  25. package/moddable/modules/data/text/encoder/textencoder.c +232 -0
  26. package/moddable/modules/data/text/encoder/textencoder.js +24 -0
  27. package/moddable/modules/data/tinyint/tinyint.c +150 -0
  28. package/moddable/modules/data/tinyint/tinyint.js +53 -0
  29. package/moddable/modules/data/url/manifest.json +17 -0
  30. package/moddable/modules/data/url/url.c +1959 -0
  31. package/moddable/modules/data/url/url.js +210 -0
  32. package/moddable/modules/data/wavreader/manifest.json +8 -0
  33. package/moddable/modules/data/wavreader/wavreader.js +128 -0
  34. package/moddable/modules/data/zlib/deflate.c +161 -0
  35. package/moddable/modules/data/zlib/deflate.js +63 -0
  36. package/moddable/modules/data/zlib/inflate.c +145 -0
  37. package/moddable/modules/data/zlib/inflate.js +66 -0
  38. package/moddable/modules/data/zlib/manifest_deflate.json +9 -0
  39. package/moddable/modules/data/zlib/manifest_inflate.json +9 -0
  40. package/moddable/modules/data/zlib/miniz.c +4924 -0
  41. package/moddable/xs/includes/xs.d.ts +73 -0
  42. package/moddable/xs/includes/xs.h +1533 -0
  43. package/moddable/xs/includes/xsmc.h +206 -0
  44. package/moddable/xs/makefiles/lin/makefile +33 -0
  45. package/moddable/xs/makefiles/lin/xsc.mk +118 -0
  46. package/moddable/xs/makefiles/lin/xsid.mk +90 -0
  47. package/moddable/xs/makefiles/lin/xsl.mk +168 -0
  48. package/moddable/xs/makefiles/lin/xst.mk +201 -0
  49. package/moddable/xs/makefiles/mac/makefile +33 -0
  50. package/moddable/xs/makefiles/mac/xsc.mk +130 -0
  51. package/moddable/xs/makefiles/mac/xsid.mk +102 -0
  52. package/moddable/xs/makefiles/mac/xsl.mk +177 -0
  53. package/moddable/xs/makefiles/mac/xst.mk +203 -0
  54. package/moddable/xs/makefiles/mac/xst_no_asan.txt +52 -0
  55. package/moddable/xs/makefiles/win/build.bat +26 -0
  56. package/moddable/xs/makefiles/win/xsc.mak +142 -0
  57. package/moddable/xs/makefiles/win/xsid.mak +113 -0
  58. package/moddable/xs/makefiles/win/xsl.mak +186 -0
  59. package/moddable/xs/makefiles/win/xst.mak +195 -0
  60. package/moddable/xs/platforms/lin_xs.h +99 -0
  61. package/moddable/xs/platforms/mac_xs.h +97 -0
  62. package/moddable/xs/platforms/wasm_xs.h +79 -0
  63. package/moddable/xs/platforms/win_xs.h +104 -0
  64. package/moddable/xs/platforms/xsHost.h +63 -0
  65. package/moddable/xs/platforms/xsPlatform.h +618 -0
  66. package/moddable/xs/sources/xsAPI.c +2555 -0
  67. package/moddable/xs/sources/xsAll.c +294 -0
  68. package/moddable/xs/sources/xsAll.h +2741 -0
  69. package/moddable/xs/sources/xsArguments.c +222 -0
  70. package/moddable/xs/sources/xsArray.c +2657 -0
  71. package/moddable/xs/sources/xsAtomics.c +844 -0
  72. package/moddable/xs/sources/xsBigInt.c +1859 -0
  73. package/moddable/xs/sources/xsBoolean.c +109 -0
  74. package/moddable/xs/sources/xsCode.c +4493 -0
  75. package/moddable/xs/sources/xsCommon.c +1710 -0
  76. package/moddable/xs/sources/xsCommon.h +1142 -0
  77. package/moddable/xs/sources/xsDataView.c +2890 -0
  78. package/moddable/xs/sources/xsDate.c +1541 -0
  79. package/moddable/xs/sources/xsDebug.c +2710 -0
  80. package/moddable/xs/sources/xsDefaults.c +134 -0
  81. package/moddable/xs/sources/xsError.c +353 -0
  82. package/moddable/xs/sources/xsFunction.c +776 -0
  83. package/moddable/xs/sources/xsGenerator.c +865 -0
  84. package/moddable/xs/sources/xsGlobal.c +839 -0
  85. package/moddable/xs/sources/xsJSON.c +1091 -0
  86. package/moddable/xs/sources/xsLexical.c +1969 -0
  87. package/moddable/xs/sources/xsLockdown.c +933 -0
  88. package/moddable/xs/sources/xsMapSet.c +1649 -0
  89. package/moddable/xs/sources/xsMarshall.c +1020 -0
  90. package/moddable/xs/sources/xsMath.c +624 -0
  91. package/moddable/xs/sources/xsMemory.c +1941 -0
  92. package/moddable/xs/sources/xsModule.c +3101 -0
  93. package/moddable/xs/sources/xsNumber.c +560 -0
  94. package/moddable/xs/sources/xsObject.c +1102 -0
  95. package/moddable/xs/sources/xsPlatforms.c +480 -0
  96. package/moddable/xs/sources/xsProfile.c +577 -0
  97. package/moddable/xs/sources/xsPromise.c +1199 -0
  98. package/moddable/xs/sources/xsProperty.c +636 -0
  99. package/moddable/xs/sources/xsProxy.c +1014 -0
  100. package/moddable/xs/sources/xsRegExp.c +1168 -0
  101. package/moddable/xs/sources/xsRun.c +4889 -0
  102. package/moddable/xs/sources/xsScope.c +1293 -0
  103. package/moddable/xs/sources/xsScript.c +288 -0
  104. package/moddable/xs/sources/xsScript.h +1186 -0
  105. package/moddable/xs/sources/xsSnapshot.c +2161 -0
  106. package/moddable/xs/sources/xsSnapshot.h +51 -0
  107. package/moddable/xs/sources/xsSourceMap.c +218 -0
  108. package/moddable/xs/sources/xsString.c +3332 -0
  109. package/moddable/xs/sources/xsSymbol.c +503 -0
  110. package/moddable/xs/sources/xsSyntaxical.c +4193 -0
  111. package/moddable/xs/sources/xsTree.c +1893 -0
  112. package/moddable/xs/sources/xsType.c +1488 -0
  113. package/moddable/xs/sources/xsdtoa.c +6672 -0
  114. package/moddable/xs/sources/xsmc.c +340 -0
  115. package/moddable/xs/sources/xsre.c +7578 -0
  116. package/package.json +37 -20
  117. package/scripts/get_xsnap_version.sh +14 -0
  118. package/scripts/test-package.sh +21 -0
  119. package/src/avaAssertXS.js +6 -2
  120. package/src/avaHandler.cjs +2 -5
  121. package/src/avaXS.js +7 -8
  122. package/src/build.js +161 -28
  123. package/src/replay.js +0 -3
  124. package/src/xsnap.js +105 -91
  125. package/src/xsrepl.js +2 -3
  126. package/xsnap-native/xsnap/makefiles/lin/makefile +10 -0
  127. package/xsnap-native/xsnap/makefiles/lin/xsnap-worker.mk +156 -0
  128. package/xsnap-native/xsnap/makefiles/lin/xsnap.mk +144 -0
  129. package/xsnap-native/xsnap/makefiles/mac/makefile +10 -0
  130. package/xsnap-native/xsnap/makefiles/mac/xsnap-worker.mk +165 -0
  131. package/xsnap-native/xsnap/makefiles/mac/xsnap.mk +153 -0
  132. package/xsnap-native/xsnap/sources/xsnap-worker.c +1008 -0
  133. package/xsnap-native/xsnap/sources/xsnap.c +717 -0
  134. package/xsnap-native/xsnap/sources/xsnap.h +142 -0
  135. package/xsnap-native/xsnap/sources/xsnapPlatform.c +1501 -0
  136. package/xsnap-native/xsnap/sources/xsnapPlatform.h +105 -0
  137. package/CHANGELOG.md +0 -654
@@ -0,0 +1,139 @@
1
+ /*
2
+ * Copyright (c) 2016-2022 Moddable Tech, Inc.
3
+ *
4
+ * This file is part of the Moddable SDK Runtime.
5
+ *
6
+ * The Moddable SDK Runtime is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser General Public License as published by
8
+ * the Free Software Foundation, either version 3 of the License, or
9
+ * (at your option) any later version.
10
+ *
11
+ * The Moddable SDK Runtime is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with the Moddable SDK Runtime. If not, see <http://www.gnu.org/licenses/>.
18
+ *
19
+ */
20
+
21
+ #include "xsPlatform.h"
22
+ #include "xsmc.h"
23
+
24
+ static const char *gHexUpper ICACHE_FLASH_ATTR = "0123456789ABCDEF";
25
+
26
+ void xs_hex_toString(xsMachine *the)
27
+ {
28
+ int argc = xsmcArgc;
29
+ const uint8_t *bytes;
30
+ char *string;
31
+ xsUnsignedValue length, i;
32
+ char separator = 0;
33
+ char *gHex = (char *)gHexUpper;
34
+
35
+ xsmcGetBufferReadable(xsArg(0), (void **)&bytes, &length);
36
+ if (0 == length)
37
+ xsUnknownError("0 length buffer");
38
+
39
+ if (argc > 1) {
40
+ char *str = xsmcToString(xsArg(1));
41
+ int len = c_strlen(str);
42
+ if (len) {
43
+ if (len > 1)
44
+ xsUnknownError("invalid separator");
45
+ separator = c_read8(str);
46
+ if (!separator || (0x80 & separator))
47
+ xsUnknownError("invalid separator");
48
+ }
49
+ if (argc > 2) {
50
+ gHex = xsmcToString(xsArg(2));
51
+ if (16 != c_strlen(gHex))
52
+ xsUnknownError("bad string");
53
+ for (i = 0; i < 16; i++) { // 7-bit ASCII, not UTF-8
54
+ if (!gHex[i] || (0x80 & gHex[i]))
55
+ xsUnknownError("bad string");
56
+ }
57
+ }
58
+ }
59
+
60
+ xsResult = xsStringBuffer(NULL, (length * 2) + (separator ? (length - 1) : 0));
61
+ string = xsmcToString(xsResult);
62
+ xsmcGetBufferReadable(xsArg(0), (void **)&bytes, &length);
63
+ if (argc > 2)
64
+ gHex = xsmcToString(xsArg(2));
65
+
66
+ for (i = 0; i < length; i++) {
67
+ uint8_t byte = c_read8(bytes++);
68
+ if (separator && (0 != i))
69
+ *string++ = separator;
70
+ *string++ = c_read8(&gHex[byte >> 4]);
71
+ *string++ = c_read8(&gHex[byte & 0x0F]);
72
+ }
73
+ }
74
+
75
+ void xs_hex_toBuffer(xsMachine *the)
76
+ {
77
+ int argc = xsmcArgc;
78
+ char separator = 0;
79
+ const char *string;
80
+ uint8_t *bytes;
81
+ int length, i;
82
+
83
+ if (argc > 1) {
84
+ char *str = xsmcToString(xsArg(1));
85
+ length = c_strlen(str);
86
+ if (length) {
87
+ if (length > 1)
88
+ xsUnknownError("invalid separator");
89
+ separator = c_read8(str);
90
+ if (!separator || (0x80 & separator))
91
+ xsUnknownError("invalid separator");
92
+ }
93
+ }
94
+
95
+ string = xsmcToString(xsArg(0));
96
+ length = c_strlen(string);
97
+ if (length < 2)
98
+ xsUnknownError("string too small");
99
+
100
+ if ((separator && ((length + 1) % 3)) || (!separator && (length % 2)))
101
+ xsUnknownError("bad string length");
102
+
103
+ length = separator ? ((length + 1) / 3) : (length / 2);
104
+ xsmcSetArrayBuffer(xsResult, NULL, length);
105
+ bytes = xsmcToArrayBuffer(xsResult);
106
+ string = xsmcToString(xsArg(0)); // refresh
107
+ for (i = 0; i < length; i++) {
108
+ uint8_t c;
109
+ uint8_t byte;
110
+
111
+ if (separator && (0 != i)) {
112
+ if (c_read8(string++) != separator)
113
+ xsUnknownError("expected separator");
114
+ }
115
+
116
+ c = c_read8(string++);
117
+ if (('0' <= c) && (c <= '9'))
118
+ byte = c - '0';
119
+ else if (('A' <= c) && (c <= 'F'))
120
+ byte = c - 'A' + 10;
121
+ else if (('a' <= c) && (c <= 'f'))
122
+ byte = c - 'a' + 10;
123
+ else
124
+ xsUnknownError("bad data");
125
+ byte <<= 4;
126
+
127
+ c = c_read8(string++);
128
+ if (('0' <= c) && (c <= '9'))
129
+ byte |= c - '0';
130
+ else if (('A' <= c) && (c <= 'F'))
131
+ byte |= c - 'A' + 10;
132
+ else if (('a' <= c) && (c <= 'f'))
133
+ byte |= c - 'a' + 10;
134
+ else
135
+ xsUnknownError("bad data");
136
+
137
+ *bytes++ = byte;
138
+ }
139
+ }
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Copyright (c) 2016-2017 Moddable Tech, Inc.
3
+ *
4
+ * This file is part of the Moddable SDK Runtime.
5
+ *
6
+ * The Moddable SDK Runtime is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser General Public License as published by
8
+ * the Free Software Foundation, either version 3 of the License, or
9
+ * (at your option) any later version.
10
+ *
11
+ * The Moddable SDK Runtime is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with the Moddable SDK Runtime. If not, see <http://www.gnu.org/licenses/>.
18
+ *
19
+ */
20
+
21
+ /*
22
+ logical operations on buffers
23
+ */
24
+
25
+ export default class {
26
+ static not(dst) {
27
+ this.xor(dst, 0xff);
28
+ }
29
+ static xor(dst, src) @ "xs_logical_xor";
30
+ static and(dst, src) @ "xs_logical_and";
31
+ static or(dst, src) @ "xs_logical_or";
32
+ }
@@ -0,0 +1,98 @@
1
+ /*
2
+ * Copyright (c) 2016-2022 Moddable Tech, Inc.
3
+ *
4
+ * This file is part of the Moddable SDK Runtime.
5
+ *
6
+ * The Moddable SDK Runtime is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser General Public License as published by
8
+ * the Free Software Foundation, either version 3 of the License, or
9
+ * (at your option) any later version.
10
+ *
11
+ * The Moddable SDK Runtime is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with the Moddable SDK Runtime. If not, see <http://www.gnu.org/licenses/>.
18
+ *
19
+ */
20
+
21
+ #include "xsPlatform.h"
22
+ #include "xsmc.h"
23
+
24
+ enum {
25
+ kOpXor,
26
+ kOpAnd,
27
+ kOpOr
28
+ };
29
+
30
+ static void xs_logical_op(xsMachine *the, int operation)
31
+ {
32
+ int srcType = xsmcTypeOf(xsArg(1));
33
+ uint8_t scratch;
34
+ uint8_t *src, *dst;
35
+ xsUnsignedValue srcLen, dstLen, i = 0;
36
+
37
+ xsmcGetBufferWritable(xsArg(0), (void **)&dst, &dstLen);
38
+
39
+ switch (srcType) {
40
+ case xsIntegerType:
41
+ case xsNumberType:
42
+ scratch = (uint8_t)xsmcToInteger(xsArg(1));
43
+ src = &scratch;
44
+ srcLen = 1;
45
+ break;
46
+
47
+ case xsStringType:
48
+ src = (uint8_t *)xsmcToString(xsArg(1));
49
+ srcLen = c_strlen((char *)src);
50
+ break;
51
+
52
+ case xsReferenceType:
53
+ xsmcGetBufferReadable(xsArg(1), (void **)&src, &srcLen);
54
+ break;
55
+
56
+ default:
57
+ xsUnknownError("unsupported source");
58
+ break;
59
+ }
60
+
61
+ if (kOpXor == operation) {
62
+ while (dstLen--) {
63
+ *dst++ ^= src[i++];
64
+ if (i == srcLen)
65
+ i = 0;
66
+ }
67
+ }
68
+ else
69
+ if (kOpOr == operation) {
70
+ while (dstLen--) {
71
+ *dst++ |= src[i++];
72
+ if (i == srcLen)
73
+ i = 0;
74
+ }
75
+ }
76
+ else {
77
+ while (dstLen--) {
78
+ *dst++ &= src[i++];
79
+ if (i == srcLen)
80
+ i = 0;
81
+ }
82
+ }
83
+ }
84
+
85
+ void xs_logical_xor(xsMachine *the)
86
+ {
87
+ xs_logical_op(the, kOpXor);
88
+ }
89
+
90
+ void xs_logical_and(xsMachine *the)
91
+ {
92
+ xs_logical_op(the, kOpAnd);
93
+ }
94
+
95
+ void xs_logical_or(xsMachine *the)
96
+ {
97
+ xs_logical_op(the, kOpOr);
98
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "modules": {
3
+ "*": [
4
+ "./qrcode",
5
+ "./qrcodegen"
6
+ ]
7
+ },
8
+ "preload": "qrcode"
9
+ }
@@ -0,0 +1,93 @@
1
+ /*
2
+ * Copyright (c) 2018-2022 Moddable Tech, Inc.
3
+ *
4
+ * This file is part of the Moddable SDK Runtime.
5
+ *
6
+ * The Moddable SDK Runtime is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser General Public License as published by
8
+ * the Free Software Foundation, either version 3 of the License, or
9
+ * (at your option) any later version.
10
+ *
11
+ * The Moddable SDK Runtime is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with the Moddable SDK Runtime. If not, see <http://www.gnu.org/licenses/>.
18
+ *
19
+ */
20
+ #include "xsmc.h"
21
+ #include "mc.xs.h" // for xsID_ values
22
+
23
+ #include "qrcodegen.h"
24
+ #include "xsHost.h"
25
+
26
+ void xs_qrcode(xsMachine *the)
27
+ {
28
+ size_t bufferSize;
29
+ uint8_t *qr0 = NULL;
30
+ void *data;
31
+ xsType type;
32
+ uint8_t ok;
33
+ int x, y;
34
+ uint8_t *module;
35
+ int maxVersion = qrcodegen_VERSION_MAX;
36
+
37
+ xsmcVars(3);
38
+
39
+ if (xsmcHas(xsArg(0), xsID_maxVersion)) {
40
+ xsmcGet(xsVar(0), xsArg(0), xsID_maxVersion);
41
+ maxVersion = xsmcToInteger(xsVar(0));
42
+ if ((maxVersion > qrcodegen_VERSION_MAX) || (maxVersion < qrcodegen_VERSION_MIN))
43
+ xsRangeError("invalid");
44
+ }
45
+
46
+ bufferSize = qrcodegen_BUFFER_LEN_FOR_VERSION(maxVersion);
47
+ qr0 = c_malloc(bufferSize << 1);
48
+ if (!qr0)
49
+ xsUnknownError("no memory");
50
+
51
+ xsTry {
52
+ xsmcGet(xsVar(0), xsArg(0), xsID_input);
53
+ type = xsmcTypeOf(xsVar(0));
54
+ if (xsStringType == type) {
55
+ data = xsmcToString(xsVar(0));
56
+ ok = qrcodegen_encodeText(data, qr0 + bufferSize, qr0,
57
+ qrcodegen_Ecc_MEDIUM, qrcodegen_VERSION_MIN, maxVersion, qrcodegen_Mask_AUTO, true);
58
+ }
59
+ else {
60
+ xsUnsignedValue dataSize;
61
+
62
+ xsmcGetBufferReadable(xsVar(0), &data, &dataSize);
63
+ if (dataSize > bufferSize)
64
+ xsUnknownError("invalid");
65
+ c_memcpy(qr0 + bufferSize, data, dataSize);
66
+ ok = qrcodegen_encodeBinary(qr0 + bufferSize, dataSize, qr0,
67
+ qrcodegen_Ecc_MEDIUM, qrcodegen_VERSION_MIN, maxVersion, qrcodegen_Mask_AUTO, true);
68
+ }
69
+
70
+ if (!ok)
71
+ xsUnknownError("qrcode failed");
72
+
73
+ int size = qrcodegen_getSize(qr0);
74
+
75
+ xsmcSetArrayBuffer(xsResult, NULL, size * size);
76
+
77
+ xsmcSetInteger(xsVar(0), size);
78
+ xsmcSet(xsResult, xsID_size, xsVar(0));
79
+
80
+ module = xsmcToArrayBuffer(xsResult);
81
+ for (y = 0; y < size; y++) {
82
+ for (x = 0; x < size; x++)
83
+ *module++ = qrcodegen_getModule(qr0, x, y);
84
+ }
85
+
86
+ c_free(qr0);
87
+ }
88
+ xsCatch {
89
+ c_free(qr0);
90
+
91
+ xsThrow(xsException);
92
+ }
93
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2018 Moddable Tech, Inc.
3
+ *
4
+ * This file is part of the Moddable SDK Runtime.
5
+ *
6
+ * The Moddable SDK Runtime is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser General Public License as published by
8
+ * the Free Software Foundation, either version 3 of the License, or
9
+ * (at your option) any later version.
10
+ *
11
+ * The Moddable SDK Runtime is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with the Moddable SDK Runtime. If not, see <http://www.gnu.org/licenses/>.
18
+ *
19
+ */
20
+
21
+ function QRCode(dictonary) @ "xs_qrcode";
22
+
23
+ export default QRCode;