Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pull-window

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pull-window

group pull-stream chunks into length or time windows.

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15K
decreased by-60.32%
Maintainers
1
Weekly downloads
 
Created
Source

pull-window

group pull-stream chunks into length or time windows.

Example

Group data coming out of a pull-stream. If the pull-stream rate is not consistent, buffer items, but do not buffer them for very long.

var pull   = require('pull-stream')
var window = require('pull-window')

pull.Source(function () {
  var i = 0
  return function (abort, cb) {
    setTimeout(function () {
      cb(null, i++)
    }, Math.random() * 200)
  }
})()
.pipe(window(10, 200))
.pipe(pull.log())

License

MIT

FAQs

Package last updated on 05 Apr 2013

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc