Slugify a string with comprehensive Unicode transliteration and extensive customization options
94
{
"context": "This criteria evaluates the engineer's ability to use the @sindresorhus/slugify package's locale-specific transliteration feature. The focus is on correctly passing the locale option to the slugify function to achieve language-appropriate character transliteration for Swedish, German, and Turkish content.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Package import",
"description": "Correctly imports the slugify function from @sindresorhus/slugify package (e.g., import slugify from '@sindresorhus/slugify' or const slugify = require('@sindresorhus/slugify'))",
"max_score": 10
},
{
"name": "Locale option usage",
"description": "Uses the locale option when calling slugify to specify locale-specific transliteration (e.g., slugify(text, { locale: 'sv' }))",
"max_score": 25
},
{
"name": "Swedish locale implementation",
"description": "Correctly applies Swedish locale ('sv') for Swedish content to achieve proper transliteration of Swedish characters (å, ä, ö)",
"max_score": 15
},
{
"name": "German locale implementation",
"description": "Correctly applies German locale ('de') for German content to achieve proper transliteration of German umlauts and ß",
"max_score": 15
},
{
"name": "Turkish locale implementation",
"description": "Correctly applies Turkish locale ('tr') for Turkish content to achieve proper transliteration of Turkish-specific characters",
"max_score": 15
},
{
"name": "Default transliteration handling",
"description": "Handles cases without a specific locale by calling slugify without the locale option or with undefined locale, allowing default transliteration behavior",
"max_score": 10
},
{
"name": "Multiple posts processing",
"description": "Implements the batch processing function that maps over posts array and applies appropriate locale for each post based on the language property",
"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