Socket
Socket
Sign inDemoInstall

chunk-store-stream

Package Overview
Dependencies
10
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    chunk-store-stream

Convert an abstract-chunk-store compliant store into a readable or writable stream


Version published
Weekly downloads
1K
decreased by-22.95%
Maintainers
3
Install size
184 kB
Created
Weekly downloads
 

Readme

Source

chunk-store-stream travis npm downloads javascript style guide

Convert an abstract-chunk-store store into a readable or writable stream

abstract chunk store

Read/write data from/to a chunk store, with streams.

Install

npm install chunk-store-stream

Usage

Create a read stream

var ChunkStoreStream = require('chunk-store-stream')
var FSChunkStore = require('fs-chunk-store') // any chunk store will work

var chunkLength = 3
var store = new FSChunkStore(chunkLength)

// ... put some data in the store

var stream = new ChunkStoreStream.read(store, chunkLength, { length: 6 })
stream.pipe(process.stdout)

Create a write stream

var ChunkStoreStream = require('chunk-store-stream')
var FSChunkStore = require('fs-chunk-store') // any chunk store will work
var fs = require('fs')

var chunkLength = 3
var store = new FSChunkStore(chunkLength)

var stream = new ChunkStoreStream.write(store, chunkLength)
fs.createReadStream('file.txt').pipe(stream)

License

MIT. Copyright (c) Feross Aboukhadijeh.

Keywords

FAQs

Last updated on 04 Apr 2018

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