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>
29 lines
723 B
Text
29 lines
723 B
Text
export default function extent(values, valueof) {
|
|
let min;
|
|
let max;
|
|
if (valueof === undefined) {
|
|
for (const value of values) {
|
|
if (value != null) {
|
|
if (min === undefined) {
|
|
if (value >= value) min = max = value;
|
|
} else {
|
|
if (min > value) min = value;
|
|
if (max < value) max = value;
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
let index = -1;
|
|
for (let value of values) {
|
|
if ((value = valueof(value, ++index, values)) != null) {
|
|
if (min === undefined) {
|
|
if (value >= value) min = max = value;
|
|
} else {
|
|
if (min > value) min = value;
|
|
if (max < value) max = value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return [min, max];
|
|
}
|