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>
38 lines
No EOL
894 B
Text
38 lines
No EOL
894 B
Text
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = greatest;
|
|
|
|
var _ascending = _interopRequireDefault(require("./ascending.js"));
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function greatest(values, compare = _ascending.default) {
|
|
let max;
|
|
let defined = false;
|
|
|
|
if (compare.length === 1) {
|
|
let maxValue;
|
|
|
|
for (const element of values) {
|
|
const value = compare(element);
|
|
|
|
if (defined ? (0, _ascending.default)(value, maxValue) > 0 : (0, _ascending.default)(value, value) === 0) {
|
|
max = element;
|
|
maxValue = value;
|
|
defined = true;
|
|
}
|
|
}
|
|
} else {
|
|
for (const value of values) {
|
|
if (defined ? compare(value, max) > 0 : compare(value, value) === 0) {
|
|
max = value;
|
|
defined = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
return max;
|
|
} |