mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-30 03:47:57 +00:00
chore: update to version 14.0.11 and align website URLs
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createCmp = createCmp;
|
||||
/** @internal */
|
||||
function createCmp(cmp) {
|
||||
return (...items) => {
|
||||
const count = items.length;
|
||||
if (count === 0) {
|
||||
throw new Error('Must provide one or more arguments');
|
||||
}
|
||||
let result = items[0];
|
||||
for (let i = 1; i < count; i++) {
|
||||
if (cmp(items[i], result)) {
|
||||
result = items[i];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user