0.0.2 • Published 2 years ago

@dstanesc/idb-block-store v0.0.2

Weekly downloads
-
License
(Apache-2.0 AND M...
Repository
github
Last release
2 years ago

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.