Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
28 lines
774 B
JavaScript
28 lines
774 B
JavaScript
// Module ID: 14377
|
|
// Function ID: 14378
|
|
// Dependencies: [14288, 14378]
|
|
// Exports: getSupportedUnits
|
|
|
|
// Module 14377
|
|
const require = globalThis.__r;
|
|
|
|
const require = arg1;
|
|
const dependencyMap = arg6;
|
|
|
|
export const getSupportedUnits = function getSupportedUnits(locale) {
|
|
_require = locale;
|
|
const units = require("module_14378").units;
|
|
return units.filter((item) => (function isSupported(unit, arg1) {
|
|
let str = arg1;
|
|
if (undefined === arg1) {
|
|
str = "en";
|
|
}
|
|
try {
|
|
const obj = { style: "unit", unit };
|
|
const memoizedNumberFormat = locale(closure_1_1[0]).createMemoizedNumberFormat(str, obj);
|
|
return memoizedNumberFormat.resolvedOptions().unit === unit;
|
|
} catch (err) {
|
|
return false;
|
|
}
|
|
})(item, closure_0));
|
|
};
|