Slugify a string with comprehensive Unicode transliteration and extensive customization options
94
{
"context": "This criteria evaluates how effectively the engineer uses the @sindresorhus/slugify package to implement custom character replacements. The focus is on proper usage of the customReplacements option to map special characters before slugification.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import slugify",
"description": "The solution correctly imports the slugify function from @sindresorhus/slugify package",
"max_score": 10
},
{
"name": "Use customReplacements option",
"description": "The solution passes the customReplacements option to the slugify function to define custom character mappings",
"max_score": 30
},
{
"name": "Map @ to at",
"description": "The customReplacements array includes a mapping for '@' to 'at'",
"max_score": 10
},
{
"name": "Map $ to dollar",
"description": "The customReplacements array includes a mapping for '$' to 'dollar'",
"max_score": 10
},
{
"name": "Map % to percent",
"description": "The customReplacements array includes a mapping for '%' to 'percent'",
"max_score": 10
},
{
"name": "Map + to plus",
"description": "The customReplacements array includes a mapping for '+' to 'plus'",
"max_score": 10
},
{
"name": "Map # to number",
"description": "The customReplacements array includes a mapping for '#' to 'number'",
"max_score": 10
},
{
"name": "Use correct replacement format",
"description": "The customReplacements are specified as an array of [string, string] tuples in the format expected by slugify",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-sindresorhus--slugifydocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10