How to use the web-streams-polyfill/ponyfill.ReadableStream function in web-streams-polyfill

To help you get started, we’ve selected a few web-streams-polyfill examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bjornharrtell / flatgeobuf / src / ts / streams / utils.ts View on Github external
if (destroyed) return
      nodeStream.resume()
    }
  
    function cancel () {
      destroyed = true
  
      for (var name in listeners) nodeStream.removeListener(name, listeners[name])
  
      nodeStream.push(null)
      nodeStream.pause()
      if (nodeStream.destroy) nodeStream.destroy()
      else if (nodeStream.close) nodeStream.close()
    }
  
    return new ReadableStream({start: start, pull: pull, cancel: cancel})
  }

web-streams-polyfill

Web Streams, based on the WHATWG spec reference implementation

MIT
Latest version published 10 months ago

Package Health Score

83 / 100
Full package analysis