Socket
Socket
Sign inDemoInstall

stream-slice

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    stream-slice

slice stream like buffer/string


Version published
Weekly downloads
481K
decreased by-19.98%
Maintainers
1
Install size
4.43 kB
Created
Weekly downloads
 

Readme

Source

stream-slice Build Status

slicing stream like buffer/string

Installation

$ npm install stream-slice --save

Usage

var fs = require('fs');
var slice = require('stream-slice').slice;
fs.createReadStream('your path')
  .pipe(slice(10, 100))
  .on('data', function() {
    // here we only get the buffer from 10th to 100th.
  });

slicing file

var fs = require('fs');
var slice = require('stream-slice').slice;
fs.createReadStream('sourc file path')
  .pipe(slice(0, 200))
  .pipe(fs.createWriteStream('dest file path'));

License

MIT

Keywords

FAQs

Last updated on 16 Jul 2014

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