UNPKG

igir

Version:

🕹 A zero-setup ROM collection manager that sorts, filters, extracts or archives, patches, and reports on collections of any size on any OS.

22 lines (21 loc) • 762 B
class IntlUtil { /** * Returns a string with a language-sensitive representation of a number. */ static toLocaleString(number, minimumIntegerDigits) { return this.paddedNumberFormatter(minimumIntegerDigits).format(number); } static paddedNumberFormatterCache = /* @__PURE__ */ new Map(); static paddedNumberFormatter(minimumIntegerDigits) { let numberFormat = this.paddedNumberFormatterCache.get(minimumIntegerDigits); if (numberFormat === void 0) { numberFormat = new Intl.NumberFormat(void 0, { minimumIntegerDigits, useGrouping: true }); this.paddedNumberFormatterCache.set(minimumIntegerDigits, numberFormat); } return numberFormat; } } export { IntlUtil as default }; //# sourceMappingURL=intlUtil.js.map