UNPKG

@razorpay/blade

Version:

The Design System that powers Razorpay

33 lines (26 loc) 879 B
import { getDefaultExportFromCjs } from '../../../../_virtual/_commonjsHelpers.js'; import { __exports as minBy$1 } from '../../../../_virtual/minBy4.js'; (function (exports) { 'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); function minBy(items, getValue) { if (items.length === 0) { return undefined; } let minElement = items[0]; let min = getValue(minElement, 0, items); for (let i = 1; i < items.length; i++) { const element = items[i]; const value = getValue(element, i, items); if (value < min) { min = value; minElement = element; } } return minElement; } exports.minBy = minBy; } (minBy$1)); var minBy = /*@__PURE__*/getDefaultExportFromCjs(minBy$1); export { minBy as default }; //# sourceMappingURL=minBy.js.map