You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
401 B
JavaScript
17 lines
401 B
JavaScript
"use strict";
|
|
|
|
const Promise = require("bluebird");
|
|
const pipe = require("@promistream/pipe");
|
|
const rangeNumbers = require("@promistream/range-numbers");
|
|
const collect = require("./");
|
|
|
|
return Promise.try(() => {
|
|
return pipe([
|
|
rangeNumbers(0, 20),
|
|
collect()
|
|
]).read();
|
|
}).then((result) => {
|
|
console.log(result);
|
|
// [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ]
|
|
});
|