Creates a sink selecting the least item of the feed.
Items are ranked in source order, seeding the result with the first one; equally ranking items resolve to the first
one in source order.
An empty feed resolves to undefined; callers wanting a default supply it with ??. As ascending ranks
null before any other value, a feed carrying null resolves to it unless the comparator states otherwise.
Warning
Exhaustive: every item is drawn before the sink resolves, so an infinite feed never completes.
Streaming: no more than the least ranking item seen so far is held in memory, whatever the size of the
feed.
Stateful: the outcome covers the items drawn, so a sink closing a nested or truncated feed sees those alone.
Tip
The order module of @metreeca/core provides helper
functions for assembling complex ranking criteria.
Creates a sink selecting the least item of the feed.
Items are ranked in source order, seeding the result with the first one; equally ranking items resolve to the first one in source order.
An empty feed resolves to
undefined; callers wanting a default supply it with??. As ascending ranksnullbefore any other value, a feed carryingnullresolves to it unless the comparator states otherwise.The order module of
@metreeca/coreprovides helper functions for assembling complex ranking criteria.