@firtoz/idb-collections
v0.3.3
Published
IndexedDB collection utilities for TanStack DB — key-value adapter, query optimization
Maintainers
Readme
@firtoz/idb-collections
Key-value collections on IndexedDB for TanStack DB—with a typed adapter, helpers to build key ranges from queries, and a path to fast local reads in the browser.
Installation
npm install @firtoz/idb-collections @tanstack/db @standard-schema/specAlso: pnpm add · bun add · yarn add
Peer dependencies: @tanstack/db and @standard-schema/spec. The package builds on @firtoz/db-helpers for shared collection utilities.
What you get
createKeyValCollection/keyvalCollectionOptions— configure a TanStack DB collection backed by IndexedDB key-value storage.tryExtractIndexedQuery,KeyRangeSpec— translate query intent into IDB key ranges where possible.
Usage
import {
createKeyValCollection,
keyvalCollectionOptions,
tryExtractIndexedQuery,
} from "@firtoz/idb-collections";See tests and consumers in the monorepo for full patterns.
Links
License
MIT © Firtina Ozbalikchi
