@extra-array/max-index
Version:
Finds index of largest value.
16 lines (12 loc) • 319 B
JavaScript
;
var extraIterable = require('extra-iterable');
/**
* Finds index of largest value.
* @param x an array
* @param fc compare function (a, b)
* @param fm map function (v, i, x)
*/
function maxIndex(x, fc = null, fm = null) {
return extraIterable.maxIndex(x, fc, fm);
}
module.exports = maxIndex;