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

immediate-chunk-store

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

immediate-chunk-store

Immediate put/get for abstract-chunk-store compliant stores

  • 2.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1K
decreased by-61.08%
Maintainers
2
Weekly downloads
 
Created
Source

immediate-chunk-store travis npm downloads javascript style guide

Immediate put/get for abstract-chunk-store compliant stores

abstract chunk store

Makes store.put() chunks immediately available for store.get(), even before the store.put() callback is called. Data is stored in memory until the store.put() is complete.

Install

npm install immediate-chunk-store

Usage

var ImmediateChunkStore = require('immediate-chunk-store')
var FSChunkStore = require('fs-chunk-store') // any chunk store will work

var store = new ImmediateChunkStore(new FSChunkStore(10))

store.put(0, Buffer.from('abc'), function () { /* yolo */ })

// And now, get the same chunk out BEFORE the put is complete
store.get(0, function (err, data) {
  if (err) throw err
  console.log(data.toString()) // 'abc'
})

License

MIT. Copyright (c) Feross Aboukhadijeh.

Keywords

FAQs

Package last updated on 27 Oct 2020

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