@amsross/bs-highland
v4.1.0
Published
Bucklescript bindings for highland
Downloads
7
Readme
bs-highland
Bucklescript/ReasonML bindings for highlandjs.
Installation
npm install --save @amsross/bs-highland
Then 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);
});