Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

queued-chunk-store

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

queued-chunk-store

Queued .get for abstract-chunk-store compliant stores

  • 1.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

queued-chunk-store

###Queued .get for abstract-chunk-store compliant stores

Makes sure store.get always return a result finally. The callback for store.get is queued until a corresponding store.put is done.

Install

npm install queued-chunk-store

Usage

var Queued = require('queued-chunk-store')
var MemoryChunkStore = require('memory-chunk-store') // any chunk store will work

var store = new Queued(new MemoryChunkStore(10))

// callback will execute when a .put with index 0 is done
store.get(0, function(err, buf) {
  buf.equals(new Buffer('0123456789')) // true
})

// .put will execute the queued callback for .get
store.put(0, new Buffer('0123456789'))

License

MIT. Copyright (c) Chan Guan Hao.

Keywords

FAQs

Package last updated on 13 Apr 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc