react-native-fast-html-parser 0.1.2 → 0.1.3
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 +10 -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.3",
|
|
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,14 @@ 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 { fs.unlinkSync(destPath); } catch {}
|
|
120
|
+
return reject(new Error('Downloaded file is empty: ' + path.basename(destPath)));
|
|
121
|
+
}
|
|
122
|
+
resolve();
|
|
123
|
+
});
|
|
117
124
|
});
|
|
118
125
|
}
|
|
119
126
|
)
|
|
@@ -199,7 +206,7 @@ async function main() {
|
|
|
199
206
|
console.log(' ✓ XCFramework assembled successfully.');
|
|
200
207
|
} catch (err) {
|
|
201
208
|
console.error(' ✗ Failed to assemble XCFramework: ' + err.message);
|
|
202
|
-
|
|
209
|
+
process.exit(1);
|
|
203
210
|
}
|
|
204
211
|
} else {
|
|
205
212
|
console.log(' ✓ XCFramework already exists.');
|
|
@@ -225,7 +232,7 @@ async function main() {
|
|
|
225
232
|
'',
|
|
226
233
|
].join('\n')
|
|
227
234
|
);
|
|
228
|
-
process.exit(
|
|
235
|
+
process.exit(1);
|
|
229
236
|
}
|
|
230
237
|
|
|
231
238
|
console.log('\n[react-native-fast-html-parser] All binaries ready.\n');
|