Socket
Book a DemoInstallSign in
Socket

slice-flow.s

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slice-flow.s

Stream for slicing flow of packets

0.1.0
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

slice-flow.s

Stream for slicing flow of packets

Installation

npm install slice-flow.s

Example

var slice   = require('slice-flow.s');
var numbers = require('stream-spectrum/readable/number');
var inspect = require('inspect-stream');

var lastOne   = slice(-1);
var firstFive = slice([0, 5]);

numbers({ from: 1, to: 8 })
  .pipe(lastOne) // outputs 8
  .pipe(inspect());

numbers({ from: 10, to: 20 })
  .pipe(firstFive) // outputs 10, 11, 12, 13, 14
  .pipe(inspect());

API

var slice = require('slice-flow.s');

var stream = slice(range)

Creates transform stream that will slice input packets

  • range Number or Array. Must be one of
    • Number negative or positive
    • [Number, Number] numbers can be positive or negative, except one variant - [negative, positive]

Note: ranges with negative bounds leads to buffering data. Size of buffer is absolute value of first bound.

FAQs

Package last updated on 23 Feb 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.