JSPM

pull-timeout2

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q15886F
  • License SEE LICENSE IN LICENSE

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

Package Exports

  • pull-timeout2

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pull-timeout2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

pull-timeout2 NPM version

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([2, 4, 6, 8, 10, 12]),
  timeout(delay),
  pull.asyncMap(function (num, next) {
    setTimeout(() => next(null, num), num * 100)
  }),
  pull.log() // 2 4 6 <end>
)

license

License Zero Reciprocal Public License 2.0.1