This commit is contained in:
9
docs/snippets/wasm/getting-started/hello_world.md
Normal file
9
docs/snippets/wasm/getting-started/hello_world.md
Normal file
@@ -0,0 +1,9 @@
|
||||
```typescript title="WASM"
|
||||
import init, { extractBytes } from "kreuzberg-wasm";
|
||||
|
||||
await init();
|
||||
|
||||
const data = new Uint8Array([0x25, 0x50, 0x44, 0x46]); // PDF magic bytes
|
||||
const result = await extractBytes(data, "application/pdf", undefined);
|
||||
console.log(result.content);
|
||||
```
|
||||
Reference in New Issue
Block a user