Sha256: b1a7de9058292a9449d6bc54b1b86f48228e64468e815a6ef906f5173fab3826
Contents?: true
Size: 619 Bytes
Versions: 375
Compression:
Stored size: 619 Bytes
Contents
/** * From a list of values, find the one with the greatest weight according to * the supplied map * @param {object} params Contains 3 properties: * - map: a map indicating the order of values to run in * example: ['small', 'medium', 'large'] * - values: Array of values to take the highest from * - initial: optional starting value */ axe.utils.aggregate = function(map, values, initial) { values = values.slice(); if (initial) { values.push(initial); } var sorting = values.map(val => map.indexOf(val)).sort(); // Stupid NodeJS array.sort functor doesn't work!! return map[sorting.pop()]; };
Version data entries
375 entries across 375 versions & 1 rubygems