Socket
Socket
Sign inDemoInstall

idbkv-chunk-store

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    idbkv-chunk-store

Abstract chunk store built on idb-kv: the lightweight and simple API for indexeddb with automatic batching


Version published
Weekly downloads
1
decreased by-87.5%
Maintainers
1
Install size
26.8 kB
Created
Weekly downloads
 

Readme

Source

idbkv-chunk-store

Greenkeeper badge Travis badge standard badge npm

Abstract chunk store implementation built on idb-kv: a small IndexedDB wrapper that automatically batches for performance.

abstract chunk store

Install

npm install idbkv-chunk-store

Usage

See abstract-chunk-store

var IdbkvChunkStore = require('idbkv-chunk-store')
var store = new IdbkvChunkStore(10,
  {
    name: 'example', // data will persist to future instances with this same name Default='idbkv-chunk-store'
    length: 37, // allows partial final chunks Default=Infinity
    batchInterval: 10 // sets batch interval for idb-kv Default=10ms
  }
)

store.put(0, Buffer.from('0123456789'), (err) => {
  if (err) throw err
  store.get(0, (err, chunk) => {
    if (err) throw err
    console.log(chunk) // outputs '0123456789' as a buffer
  })
})

Compatibility

idb-kv uses async functions, so those need to be supported to use this library.

Keywords

FAQs

Last updated on 16 May 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc