react-native-fast-html-parser 0.1.3 → 0.1.4
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/package.json +1 -1
- package/scripts/postinstall.js +9 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-fast-html-parser",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "A lightning-fast HTML parser library for React Native that converts raw HTML fragments into a structured JSON AST tree. Built on a high-performance Rust core and integrated via direct C++ JSI HostObjects, it achieves pure zero-copy shared-memory access on-device. This avoids standard string/JSON serialization overhead and Hermes garbage collection pauses during render loops.",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
package/scripts/postinstall.js
CHANGED
|
@@ -113,11 +113,17 @@ function download(url, destPath) {
|
|
|
113
113
|
}
|
|
114
114
|
res.pipe(file);
|
|
115
115
|
file.on('finish', function () {
|
|
116
|
-
file.close(function() {
|
|
116
|
+
file.close(function () {
|
|
117
117
|
const stat = fs.statSync(destPath);
|
|
118
118
|
if (stat.size === 0) {
|
|
119
|
-
try {
|
|
120
|
-
|
|
119
|
+
try {
|
|
120
|
+
fs.unlinkSync(destPath);
|
|
121
|
+
} catch {}
|
|
122
|
+
return reject(
|
|
123
|
+
new Error(
|
|
124
|
+
'Downloaded file is empty: ' + path.basename(destPath)
|
|
125
|
+
)
|
|
126
|
+
);
|
|
121
127
|
}
|
|
122
128
|
resolve();
|
|
123
129
|
});
|