📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

stream-slice

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-slice

slice stream like buffer/string

0.1.2
latest
npm
Version published
Maintainers
1
Created
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

slice

FAQs

Package last updated on 16 Jul 2014

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