git ssb

2+

cel / scuttlebot.io



Tree: 3df455c00f8479b405e74c115766ff18a6f646c8

Files: 3df455c00f8479b405e74c115766ff18a6f646c8 / tmpl / apis / pull-stream / pull-otherwise.md

485 bytesRaw

pull-otherwise

Read from an alternative source, if the main ended.

Usage

otherwise(alt);

alt - Alternative source stream.

Example

var pull = require("pull-stream");
var otherwise = require("pull-otherwise");

var mainSource = pull.values([1,2,3,4]);
var alternative = pull.values([5,6,7,8,9]);

pull(
  mainSource,
  otherwise(alternative),
  pull.log()
)

install

With npm do:

npm install pull-otherwise

license

MIT

Built with git-ssb-web