Skip to content

fullJoin

Eugene Lazutkin edited this page Jun 25, 2026 · 1 revision

fullJoin

Full outer join of sorted streams: every named input is optional, so a row emits for any key present on any side, with the absent inputs null-filled. A thin wrapper over join — same inputs, options, and semantics, only the optionality differs.

import fullJoin from 'stream-sorting/sorted/full-join.js';

for await (const {left, right} of fullJoin({
  left: {input: a, key: r => r.id},
  right: {input: b, key: r => r.id}
})) {
  // every key in either stream; the missing side is `null`
}

A key present on only one side still emits, with the other side null. All of join's inputs, options (compareKey / lessKey / combine / maxGroupSize), and the named-bag combine apply unchanged.

See also

join, leftJoin.

Clone this wiki locally