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