4.1.0 • Published 5 years ago
@amsross/bs-highland v4.1.0
bs-highland
Bucklescript/ReasonML bindings for highlandjs.
Installation
npm install --save @amsross/bs-highlandThen add @amsross/bs-highland to bs-dependencies in your bsconfig.json:
{
...
"bs-dependencies": ["@amsross/bs-highland"]
}Usage
Generators / Push / Next
Wrap pushed data in Ok(data(thing)) and errors in Error(err)
Highland.generator((push, next) => {
condition ? push(Ok(Highland.data("something"))) : push(Error(err));
setTimeout(() => next(Js.Nullable.null), 1000);
});