This example demonst# Browser-compatible imports only import { ProtoObject, StaticImplements, protoObjectFactory, ProtoObjectBrowserStorage // Universal browser storage utility } from 'protoobject/browser';rotoObject working directly in the browser without Node.js dependencies.
browser-demo.html- Interactive demo page with all browser features
- ✅ Basic ProtoObject functionality (create, serialize, deserialize)
- ✅ JSON serialization/deserialization
- ✅ LocalStorage integration with ProtoObjectBrowserStorage
- ✅ Fetch API integration
- ✅ Performance testing
- ✅ Environment detection
- ✅ Error handling
- ✅ Array storage and retrieval
- ✅ Key management and filtering
- ✅ Backup and restore functionality
- Open
browser-demo.htmlin any modern browser for all features - Use the interactive buttons to test different features
- Check browser console for detailed logs
- Chrome 80+
- Firefox 75+
- Safari 13+
- Edge 80+
- ES6+ support
- ES Modules support
// Browser-compatible imports only
import {
ProtoObject,
StaticImplements,
protoObjectFactory,
ProtoObjectLocalStorage // New localStorage utility
} from 'protoobject/browser';✅ Core ProtoObject functionality ✅ JSON serialization/deserialization ✅ localStorage/sessionStorage integration with ProtoObjectBrowserStorage ✅ Fetch API integration ✅ IndexedDB integration ✅ WebSocket integration ✅ Performance API ✅ Array storage and management ✅ Key filtering and prefix operations ✅ Backup and restore functionality
❌ ProtoObjectSQLite (requires node:sqlite)
❌ ProtoObjectTCP (requires node:net)
❌ ProtoObjectCrypto (requires node:crypto)
❌ ProtoObjectFS (requires node:fs)
❌ ProtoObjectStream (requires node:stream)
Use browser alternatives:
- SQLite → IndexedDB
- TCP → WebSockets/Fetch
- Crypto → Web Crypto API
- FS → localStorage/IndexedDB/Fetch
- Stream → Fetch Streams/ReadableStream