@dstanesc/idb-block-store
v0.0.2
Published
Local content-addressable storage (CAS) based on IndexedDB
Downloads
4
Readme
IDB Block Store
Local content-addressable storage (CAS) based on IndexedDB and IDB-Keyval wrapper.
API
put: (block: { cid: any, bytes: Uint8Array }) => Promise<void>
get: (cid: any) => Promise<Uint8Array>
Usage
import { blockStore } from '@dstanesc/idb-block-store'
const cache = {}
const { get, put } = blockStore({ /*cache,*/});
Build
npm run clean
npm install
npm run build
Test
npm run test
Licenses
Licensed under either Apache 2.0 or MIT at your option.