@firecrawl/anydoc-wasm 0.1.4 → 0.1.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/README.md +6 -2
- package/anydoc_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,11 @@ npm install @firecrawl/anydoc-wasm
|
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
```js
|
|
12
|
-
import init, {
|
|
12
|
+
import init, {
|
|
13
|
+
formatFromBytes,
|
|
14
|
+
toMarkdownBytes,
|
|
15
|
+
toDocument,
|
|
16
|
+
} from '@firecrawl/anydoc-wasm';
|
|
13
17
|
|
|
14
18
|
await init();
|
|
15
19
|
|
|
@@ -26,7 +30,7 @@ const document = toDocument(bytes);
|
|
|
26
30
|
formatFromBytes(bytes); // 'docx', or undefined when nothing matches
|
|
27
31
|
```
|
|
28
32
|
|
|
29
|
-
The package is built with `wasm-pack --target web`: it loads with a plain `<script type="module">` and with bundlers that handle the `new URL(..., import.meta.url)` asset pattern (Vite, webpack 5, Rollup). In Node, pass the module bytes to `initSync` instead of calling `init` (see [`test.mjs`](test.mjs)).
|
|
33
|
+
The package is built with `wasm-pack --target web`: it loads with a plain `<script type="module">` and with bundlers that handle the `new URL(..., import.meta.url)` asset pattern (Vite, webpack 5, Rollup). In Node, pass the module bytes to `initSync` instead of calling `init` (see [`test.mjs`](wasm/test.mjs)).
|
|
30
34
|
|
|
31
35
|
Calls are synchronous: wasm runs single-threaded on the calling thread, so convert on a worker if the main thread must stay responsive.
|
|
32
36
|
|
package/anydoc_wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@firecrawl/anydoc-wasm",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "WebAssembly bindings for anydoc: convert documents (doc, docx, odt, rtf, epub, pdf, presentations, spreadsheets, csv) to GitHub-Flavored Markdown in the browser",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.5",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|