UNPKG

@extra-array/max-index

Version:
16 lines (12 loc) 319 B
'use strict'; 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;