Emits the highest-ranked value from amongst an array of values.
By default, it tracks the highest-ranked between arrays.
For example:
// Input[ [4,5,6], [1,2,3] ]// Outputs:[ 6 ] Copy
// Input[ [4,5,6], [1,2,3] ]// Outputs:[ 6 ]
This behaviour can be modified with an option to only compare within arrays.
// Input[ [4,5,6], [1,2,3] ]// Output:[ 6, 3 ] Copy
// Input[ [4,5,6], [1,2,3] ]// Output:[ 6, 3 ]
Uses the rank option to determine which is more highly ranked.
rank
Chains.Links.rankArray( (a, b) => { if (a > b) return `a`; // a is higher else if (b > a) return `b`; // b is higher return `eq`; // same }) Copy
Chains.Links.rankArray( (a, b) => { if (a > b) return `a`; // a is higher else if (b > a) return `b`; // b is higher return `eq`; // same })
Emits the highest-ranked value from amongst an array of values.
By default, it tracks the highest-ranked between arrays.
For example:
This behaviour can be modified with an option to only compare within arrays.
Uses the
rank
option to determine which is more highly ranked.