@formata/limitr 0.5.15 → 0.5.16

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 +25 -2
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -25,10 +25,33 @@ This breaks down with usage-based pricing, AI products, and self-hosted deployme
25
25
 
26
26
  **Limitr separates policy from code** so limits are explicit, testable, and easy to evolve.
27
27
 
28
- ## Quick Start (Local)
29
- ```typescript
28
+ ## Install
29
+ ```bash
30
30
  npm install @formata/limitr
31
31
  ```
32
+
33
+ ### Initialization
34
+ Limitr uses [Stof](https://docs.stof.dev) for policy enforcement (@formata/stof). This is sandboxed WebAssembly, and needs to be initialized once before use.
35
+
36
+ > This step is for font-end (browser) apps only. For Node.js, Deno, & Bun, this step is handled automatically by Limitr (you can skip this).
37
+
38
+ ```typescript
39
+ // Vite
40
+ import { initStof } from '@formata/stof';
41
+ import stofWasm from '@formata/stof/wasm?url';
42
+ await initStof(stofWasm);
43
+
44
+ // Browser with bundler - Pass WASM explicitly (e.g. @rollup/plugin-wasm)
45
+ import { initStof } from '@formata/stof';
46
+ import stofWasm from '@formata/stof/wasm';
47
+ await initStof(await stofWasm());
48
+
49
+ // Node.js, Deno, & Bun - Auto-detects and loads WASM (you can skip this though, Limitr does it)
50
+ import { initStof } from '@formata/stof';
51
+ await initStof();
52
+ ```
53
+
54
+ ## Quick Start (Local)
32
55
  ```typescript
33
56
  import { Limitr } from '@formata/limitr';
34
57
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formata/limitr",
3
- "version": "0.5.15",
3
+ "version": "0.5.16",
4
4
  "type": "module",
5
5
  "main": "./dist/main.js",
6
6
  "types": "./dist/main.d.ts",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "homepage": "https://limitr.dev",
29
29
  "dependencies": {
30
- "@formata/stof": "^0.9.8"
30
+ "@formata/stof": "^0.9.9"
31
31
  },
32
32
  "devDependencies": {
33
33
  "cpy-cli": "^7.0.0",