Storage Providers
SQLitePIIStorageProvider is not available in browser builds. Use IndexedDBPIIStorageProvider for browser applications.Important: Storage Requires Sessions
The storage provider is only used when you callanonymizer.session(). Direct anonymize() calls return the PII map but don’t save it:
Session Example
Multiple Conversations
Each session ID maps to a separate stored PII map:Multi-Message Conversations
Within a session, entity IDs are consistent across multipleanonymize() calls:
Session Interface
SQLite Provider (Node.js / Bun)
- Bun: Uses built-in
bun:sqlite(no additional install) - Node.js: Requires
better-sqlite3:
IndexedDB Provider (Browser)
Data Retention
Entries persist forever by default. Manage data with:Storage Provider Interface
Implement custom storage:Without Storage (Simple One-Off Usage)
For simple use cases without persistence:Next Steps
Browser Usage
Storage considerations for browsers
Encryption
Understand PII map encryption