Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

pull-timeout2

Abort a pull-stream if the rate of flow drops below the specified threshold. Uses setTimeout() under-the-hood.

example

var pull = require('pull-stream')
var timeout = require('pull-timeout2')
var delay = 500

pull(
  pull.values([1, 2, 3, 4, 5, 6, 7, 8]),
  pull.asyncMap(function (num, next) {
    setTimeout(() => next(null, num), num * 100)
  }),
  timeout(delay),
  pull.log() // 1 2 3 4 5 <end>
)

About

abort a pull-stream if the rate of flow drops below the specified threshold.

Topics

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.