@formata/stof 0.9.7 → 0.9.8

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.
Files changed (2) hide show
  1. package/README.md +14 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -179,6 +179,20 @@ if __name__ == "__main__":
179
179
  npm install @formata/stof
180
180
  ```
181
181
 
182
+ #### Initialization
183
+ Stof uses WebAssembly, so make sure to initialize it once.
184
+
185
+ ```typescript
186
+ // Node.js, Deno, & Bun - Auto-detects and loads WASM
187
+ import { initStof } from '@formata/stof';
188
+ await initStof();
189
+
190
+ // Browser with bundler - Pass WASM explicitly
191
+ import { initStof } from '@formata/stof';
192
+ import stofWasm from '@formata/stof/wasm';
193
+ await initStof(await stofWasm());
194
+ ```
195
+
182
196
  #### Quick Start
183
197
  ```typescript
184
198
  import { initStof, StofDoc } from '@formata/stof';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formata/stof",
3
- "version": "0.9.7",
3
+ "version": "0.9.8",
4
4
  "type": "module",
5
5
  "main": "./dist/doc.js",
6
6
  "types": "./dist/doc.d.ts",
@@ -9,7 +9,7 @@
9
9
  "types": "./dist/doc.d.ts",
10
10
  "default": "./dist/doc.js"
11
11
  },
12
- "./stof_bg.wasm": "./dist/pkg/stof_bg.wasm"
12
+ "./wasm": "./dist/pkg/stof_bg.wasm"
13
13
  },
14
14
  "sideEffects": false,
15
15
  "files": [