Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
12 lines
339 B
Text
12 lines
339 B
Text
import none from "./none.js";
|
|
|
|
export default function(series) {
|
|
var peaks = series.map(peak);
|
|
return none(series).sort(function(a, b) { return peaks[a] - peaks[b]; });
|
|
}
|
|
|
|
function peak(series) {
|
|
var i = -1, j = 0, n = series.length, vi, vj = -Infinity;
|
|
while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i;
|
|
return j;
|
|
}
|