Intl.LocaleMatcher ponyfill providing comprehensive locale matching algorithms with support for 'lookup' and 'best fit' strategies
94
{
"context": "This criteria evaluates how well the engineer uses locale maximization capabilities to expand incomplete locale identifiers into their full canonical forms with language, script, and region information. The focus is on correctly utilizing the Intl.Locale API's maximize() method and the @formatjs/intl-localematcher package for locale processing.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Intl.Locale instantiation",
"description": "Creates Intl.Locale objects correctly from input locale strings to enable maximization",
"max_score": 15
},
{
"name": "maximize() method usage",
"description": "Calls the maximize() method on Intl.Locale instances to expand locale identifiers with missing components",
"max_score": 30
},
{
"name": "Locale string extraction",
"description": "Extracts the maximized locale string from Intl.Locale objects using appropriate properties (e.g., toString(), baseName, or property accessors)",
"max_score": 15
},
{
"name": "Single locale processing",
"description": "Implements enrichLocale() function that correctly processes a single locale identifier and returns the expanded form",
"max_score": 20
},
{
"name": "Multiple locale processing",
"description": "Implements enrichLocales() function that correctly processes an array of locale identifiers and returns an array of expanded forms",
"max_score": 15
},
{
"name": "Error handling",
"description": "Handles invalid or malformed locale identifiers gracefully (e.g., using try-catch or validation)",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-formatjs--intl-localematcherdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10