Emits the currently ranked 'highest' value from a stream. Only values exceeding the current highest are emitted.
eg, if we are ranking on numerical value, an input stream of:
4, 1, 6, 10, 2, 4 Copy
4, 1, 6, 10, 2, 4
Results in the output stream of:
4, 6, 10 Copy
4, 6, 10
// Rank based on a fieldChains.Links.rank((a,b) => { if (a.size > b.size) return `a`; // Signals the first param is highest if (a.size < b.size) return `b`; // Signals the second param is highest return `eq`;}); Copy
// Rank based on a fieldChains.Links.rank((a,b) => { if (a.size > b.size) return `a`; // Signals the first param is highest if (a.size < b.size) return `b`; // Signals the second param is highest return `eq`;});
Emits the currently ranked 'highest' value from a stream. Only values exceeding the current highest are emitted.
eg, if we are ranking on numerical value, an input stream of:
Results in the output stream of: