Files
klz-cables.com/.pnpm-store/v10/files/63/fd9404c2888ffed5c49986e52930d01ba22c83189f5f8ace8ffef58dc9032971fc29cfb33ae8f4d2175e61ec0d0313c640ca872e38cf0b6b63e22088f0095c
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

21 lines
739 B
Plaintext

import { LookupSupportedLocales } from "@formatjs/intl-localematcher";
import { ToObject } from "./262.js";
import { GetOption } from "./GetOption.js";
/**
* https://tc39.es/ecma402/#sec-supportedlocales
* @param availableLocales
* @param requestedLocales
* @param options
*/
export function SupportedLocales(availableLocales, requestedLocales, options) {
let matcher = "best fit";
if (options !== undefined) {
options = ToObject(options);
matcher = GetOption(options, "localeMatcher", "string", ["lookup", "best fit"], "best fit");
}
if (matcher === "best fit") {
return LookupSupportedLocales(Array.from(availableLocales), requestedLocales);
}
return LookupSupportedLocales(Array.from(availableLocales), requestedLocales);
}