@dstanesc/idb-block-store
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @dstanesc/idb-block-store

Weekly Downloads

1

Version

0.0.2

License

(Apache-2.0 AND MIT)

Unpacked Size

21.1 kB

Total Files

23

Last publish

Collaborators

  • dstanesc