Strata Storage v2.6.1 is a zero-dependency universal storage library providing a unified API for web, Android, and iOS platforms. It supports multiple backends: localStorage, IndexedDB, sessionStorage, cookies, URL, and native Keychain/Keystore via Capacitor, with optional adapters for React, Vue, Angular, and Firebase. The core is pure TypeScript with strict types, ESM-only, requires Node >=24.13.0. Differentiators: provider-free usage (no React context or Vue plugin needed), opt-in encryption/compression/TTL/cross-tab sync, and zero runtime dependencies. Release cadence is active with minor updates.
npm install strata-storageNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic get/set/remove/clear operations with default 'storage' instance, then creating a custom encrypted instance with defineStorage().
Switch to ES modules: use import instead of require(), ensure package.json contains 'type': 'module'.
Use defineStorage() to create a shared instance and pass it via props or module import. See migration guide.
Remove all initialize() calls. Just call set/get/remove directly.
Always configure encryption.password in defineStorage options or pass password per-call.
Ensure 'indexedDB' is in defaultStorages when subscribing to cross-tab updates.
Set 'moduleResolution': 'bundler' (or 'node16') and 'module': 'esnext' in tsconfig.json. Ensure 'skipLibCheck': false temporarily to verify types.
Use dynamic import() instead of require(), or convert project to ES modules by adding 'type': 'module' to package.json.
Ensure you do: import { storage } from 'strata-storage'. Then use await storage.set().In defineStorage(), add encryption: { enabled: true, password: 'your-secret' } or pass password per-call: set(key, value, { encrypt: true, password: '...' })