@formatjs/intl-localematcher 0.10.1 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,6 +13,21 @@ repeated matches. Mutable best-fit arrays remain checked before cache reuse.
13
13
  matching that snapshot avoids a second validation scan. Later mutations retain
14
14
  first-match ordering and locale-data selection.
15
15
 
16
- [Constructor measurements](../../knowledge-base/audits/2026-10-31-numberformat-constructor-snapshots.md)
17
- compare warm construction with the same supported locales. Keep cold preparation,
18
- matching, construction and formatting measurements separate.
16
+ Keep cold preparation, matching, construction and formatting measurements separate.
17
+
18
+ ## Current measurements
19
+
20
+ Measured 2026-10-31 on Apple M4 Max, macOS arm64, Node 24.14.0 / ICU 78.2; source `56d15e997`. Median of seven warmed rounds.
21
+
22
+ | Operation | TS ops/s | TS full helpers ops/s | Native JS ops/s |
23
+ | ------------------- | -------: | --------------------: | --------------: |
24
+ | best fit en | 917,471† | 62,277† | — |
25
+ | best fit en-US | 470,600 | 72,354 | — |
26
+ | best fit zh-TW | 455,547 | 71,873 | — |
27
+ | best fit sr-Latn-BA | 391,251 | 71,347 | — |
28
+ | best fit en-XZ | 456,567 | 72,177 | — |
29
+ | fresh array | 38,101 | 25,985 | — |
30
+
31
+ [Methodology and raw results](../../benchmarks/polyfills/README.md).
32
+
33
+ Latest full Rust core coverage: [all-polyfill report](../../benchmarks/polyfills/README.md#rust-core-suite).
package/index.d.ts CHANGED
@@ -1,12 +1,9 @@
1
- /**
2
- * https://tc39.es/ecma402/#sec-lookupsupportedlocales
3
- * @param availableLocales
4
- * @param requestedLocales
5
- */
6
1
  export declare function LookupSupportedLocales(availableLocales: string[], requestedLocales: string[]): string[];
7
- interface ResolveLocaleResult {
2
+ export declare function FilterLocales(availableLocales: Set<string> | readonly string[], requestedLocales: readonly string[], matcher: "lookup" | "best fit", includeHostLocale?: boolean): string[];
3
+ interface ResolveLocaleResult<D = unknown> {
8
4
  locale: string;
9
5
  dataLocale: string;
6
+ localeData?: D;
10
7
  [k: string]: any;
11
8
  }
12
9
  /**
@@ -15,10 +12,9 @@ interface ResolveLocaleResult {
15
12
  export declare function ResolveLocale<K extends string, D extends { [k in K]: any; }>(availableLocales: Set<string> | readonly string[], requestedLocales: readonly string[], options: {
16
13
  localeMatcher: string;
17
14
  [k: string]: string | null | undefined;
18
- }, relevantExtensionKeys: K[], localeData: Record<string, D | undefined>, getDefaultLocale: () => string): ResolveLocaleResult;
15
+ }, relevantExtensionKeys: K[], localeData: Record<string, D | undefined> | undefined, getDefaultLocale: () => string, mode?: "includeLocaleData" | "hostDefaultWithLocaleData" | undefined): ResolveLocaleResult<D>;
19
16
  export interface Opts {
20
17
  algorithm: "lookup" | "best fit";
21
18
  }
22
19
  export declare function match(requestedLocales: readonly string[], availableLocales: readonly string[], defaultLocale: string, opts?: Opts): string;
23
- export {};
24
- //# sourceMappingURL=index.d.ts.map
20
+ export {};