How to use the flatten function from highland

Find comprehensive JavaScript highland.flatten code examples handpicked from public code repositorys.

188
189
190
191
192
193
194
195
196
197
// Cap the number of instances for all activities
// Example: concurrency=1 says only 1 instance of an activity at a time.
const concurrency = options.concurrency || DEFAULT_CONCURRENCY;

// Create a stream that represents the results
let input = $.flatten(source);

const results = options.pipeline
    ? pipelined(input, this.activities, concurrency)
    : oneAtATime(input, this.activities, concurrency);
fork icon1
star icon0
watch icon17

+ 15 other calls in file

46
47
48
49
50
51
52
53
54
55

function create() {
    return _.pipeline(
        _.map(split),
        _.append(cache),
        _.flatten
    );
}

function split(chunk) {
fork icon0
star icon0
watch icon0

+ 3 other calls in file

91
92
93
94
95
96
97
98
99
100
            }

            stream.parse(chunk, cached, push, next);

        }),
        _.flatten()
    );
}

return stream;
fork icon0
star icon0
watch icon0