react-native-nfc-manager 3.17.3 → 3.17.5
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.
- package/ios/NfcManager.m +1 -0
- package/ndef-lib/util.js +10 -1
- package/package.json +1 -11
package/ios/NfcManager.m
CHANGED
package/ndef-lib/util.js
CHANGED
|
@@ -25,9 +25,18 @@ function _utf8ArrayToStr(data) {
|
|
|
25
25
|
|
|
26
26
|
ch = (ch << 6) | (chx & 0x3f);
|
|
27
27
|
}
|
|
28
|
+
|
|
29
|
+
// A four-byte sequence can decode above the Unicode maximum, which is
|
|
30
|
+
// not a valid code point. Reject it like the other malformed cases
|
|
31
|
+
// rather than letting String.fromCodePoint throw a RangeError.
|
|
32
|
+
if (ch > 0x10ffff) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
28
35
|
}
|
|
29
36
|
|
|
30
|
-
|
|
37
|
+
// fromCharCode truncates to 16 bits, which silently corrupts anything
|
|
38
|
+
// outside the BMP: U+1F4A9 would come back as U+F4A9.
|
|
39
|
+
str += String.fromCodePoint(ch);
|
|
31
40
|
}
|
|
32
41
|
|
|
33
42
|
return str;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-nfc-manager",
|
|
3
|
-
"version": "3.17.
|
|
3
|
+
"version": "3.17.5",
|
|
4
4
|
"description": "A NFC module for react native.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -33,16 +33,6 @@
|
|
|
33
33
|
"jest": {
|
|
34
34
|
"testEnvironment": "node"
|
|
35
35
|
},
|
|
36
|
-
"babel": {
|
|
37
|
-
"presets": [
|
|
38
|
-
"@babel/preset-env",
|
|
39
|
-
"@babel/preset-react"
|
|
40
|
-
],
|
|
41
|
-
"plugins": [
|
|
42
|
-
"@babel/plugin-proposal-class-properties",
|
|
43
|
-
"@babel/plugin-transform-runtime"
|
|
44
|
-
]
|
|
45
|
-
},
|
|
46
36
|
"devDependencies": {
|
|
47
37
|
"@babel/core": "^7.12.10",
|
|
48
38
|
"@babel/plugin-proposal-class-properties": "^7.12.1",
|