🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

pull-offset-limit

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

pull-offset-limit

A pull-stream that filters until X elements, and stops streaming after Y elements.

latest
Source
npmnpm
Version
1.1.1
Version published
Weekly downloads
864
100.46%
Maintainers
1
Weekly downloads
 
Created
Source

pull-offset-limit

npm version build status test coverage downloads js-standard-style

A pull-stream that filters until X elements, and stops streaming after Y elements. Useful for pagination purposes.

Usage

const pull = require('pull-stream')
const split = require('pull-split')
const offsetLimit = require('pull-offset-limit')
 
pull(
  textStream, // some text stream
  split(), // split on new lines
  offsetLimit(5, 20), // after 5 lines, take 20
  output
)

API

offsetLimit = require('pull-offset-limit')(offset, limit, onLimit)

Create a new offsetLimit through stream.

  • offset: if set, filters stream until offset is reached
  • limit: if set, stops stream when limit is reached
  • onLimit: if set, runs when limit is reached

Installation

$ npm install pull-offset-limit

License

MIT

Keywords

pull-stream

FAQs

Package last updated on 13 Apr 2017

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