rafa
Version:
Rafa.js is a Javascript framework for building concurrent applications.
19 lines (14 loc) • 435 B
Markdown
Apply a splitter function to each incoming value message.
If the splitter function returns an array of values, then each of those
values are sent individually to child streams, otherwise the original value is
returned.
<aside>
```js
// split(splitter: A => [A]): Stream
var stream = Rafa.stream();
var values = [];
stream.split(v => v.split(',')).each(v => values.push(v));
stream.write("a,b");
values: ["a", "b"];
```
</aside>