Skip to content
Malexion edited this page Oct 31, 2016 · 1 revision

__.rank(obj, [func])

  • obj Item to iterate over, must be sorted in proper order.
  • [func] [Optional] Function path to the item to evaluate.

Examples

var ranks = __.rank(__.sort([ 5, 77, 0, 1, 0, 18 ], { dir: 'desc' }));

console.log(ranks);
Clone this wiki locally