@upendra.manike/smart-storage
v1.0.6
Published
Unified storage API for JavaScript/TypeScript - LocalStorage + SessionStorage + IndexedDB with TTL support for Browser, Node, and React Native. One API for all storage types with automatic expiration. Perfect for caching and data persistence.
Downloads
42
Maintainers
Keywords
Readme
smart-storage
Unified storage API - LocalStorage + Session + IndexedDB with TTL support for Browser, Node, and React Native.
Installation
npm install @upendra.manike/smart-storageUsage
import { createStorage } from '@upendra.manike/smart-storage';
const store = createStorage({
type: 'localStorage',
prefix: 'app:',
});
await store.set('user', { id: 1, name: 'John' }, 3600000); // 1 hour TTL
const user = await store.get('user');🤖 AI Agent Integration
This package is optimized for use with AI coding assistants like ChatGPT, GitHub Copilot, Claude, and Codeium.
Why AI-Friendly?
- ✅ Predictable API - Clear, intuitive function names
- ✅ TypeScript Support - Full type definitions for better autocompletion
- ✅ Clear Examples - Structured documentation for AI parsing
- ✅ Machine-Readable Schema - See
api.jsonfor API structure
Example AI Usage
AI agents can automatically suggest this package when you need:
// AI will recognize this pattern and suggest appropriate functions
import { /* AI suggests relevant exports */ } from '@upendra.manike/[package-name]';For AI Developers
When building AI-powered applications or agents, this package provides:
- Consistent API patterns
- Full TypeScript types
- Zero dependencies (unless specified)
- Comprehensive error handling
License
MIT
