react-native-fast-html-parser 0.1.2 → 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/README.md +7 -1
- package/package.json +1 -1
- package/scripts/postinstall.js +16 -3
package/README.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# react-native-fast-html-parser
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/react-native-fast-html-parser)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
[](https://github.com/abhishekce17/react-native-fast-html-parser)
|
|
6
|
+
[](https://nitro.margelo.com)
|
|
7
|
+
[](https://www.rust-lang.org)
|
|
8
|
+
|
|
9
|
+
A high-performance, zero-copy HTML-to-structured-JSON parser library for React Native. Powered by a lightning-fast Rust core engine and integrated via direct C++ JSI using Margelo Nitro Modules.
|
|
4
10
|
|
|
5
11
|
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.
|
|
6
12
|
|
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,7 +113,20 @@ function download(url, destPath) {
|
|
|
113
113
|
}
|
|
114
114
|
res.pipe(file);
|
|
115
115
|
file.on('finish', function () {
|
|
116
|
-
file.close(
|
|
116
|
+
file.close(function () {
|
|
117
|
+
const stat = fs.statSync(destPath);
|
|
118
|
+
if (stat.size === 0) {
|
|
119
|
+
try {
|
|
120
|
+
fs.unlinkSync(destPath);
|
|
121
|
+
} catch {}
|
|
122
|
+
return reject(
|
|
123
|
+
new Error(
|
|
124
|
+
'Downloaded file is empty: ' + path.basename(destPath)
|
|
125
|
+
)
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
resolve();
|
|
129
|
+
});
|
|
117
130
|
});
|
|
118
131
|
}
|
|
119
132
|
)
|
|
@@ -199,7 +212,7 @@ async function main() {
|
|
|
199
212
|
console.log(' ✓ XCFramework assembled successfully.');
|
|
200
213
|
} catch (err) {
|
|
201
214
|
console.error(' ✗ Failed to assemble XCFramework: ' + err.message);
|
|
202
|
-
|
|
215
|
+
process.exit(1);
|
|
203
216
|
}
|
|
204
217
|
} else {
|
|
205
218
|
console.log(' ✓ XCFramework already exists.');
|
|
@@ -225,7 +238,7 @@ async function main() {
|
|
|
225
238
|
'',
|
|
226
239
|
].join('\n')
|
|
227
240
|
);
|
|
228
|
-
process.exit(
|
|
241
|
+
process.exit(1);
|
|
229
242
|
}
|
|
230
243
|
|
|
231
244
|
console.log('\n[react-native-fast-html-parser] All binaries ready.\n');
|