Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 891 Bytes

README.md

File metadata and controls

45 lines (31 loc) · 891 Bytes

@mauna/reason-web-streams

npm License: MIT

ReasonWebStreams is the Reason bindings for web-streams-polyfill.

Install

npm i @mauna/reason-web-streams

Add it to bsconfig.json

  "bs-dependencies": [
+   "@mauna/reason-web-streams",
  ]

You can now use the MaunaReasonWebStreams module.

Usage

open MaunaReasonWebStreams

let underlyingSource: ReadableStream.underlyingSource('a) = {
  start: None,
  pull: None,
  cancel: None,
  type_: None,
};

let strategy: ReadableStream.queuingStrategy('a) = {
  highWaterMark: None,
  size: None,
};

let readable =
  ReadableStream.make(~underlyingSource, ~strategy=Some(strategy), ());