Slugify a string with comprehensive Unicode transliteration and extensive customization options
94
Build a utility that converts blog post titles into clean, URL-friendly slugs for use in a content management system.
@generates
Your utility must handle various types of blog post titles and convert them into clean, URL-safe slugs suitable for use in web addresses. The slugs should be readable, consistent, and work across different languages.
The utility should:
/**
* Converts a blog post title into a URL-friendly slug
* @param {string} title - The blog post title to convert
* @returns {string} A URL-safe slug
*/
function generateSlug(title) {
// Implementation
}
module.exports = { generateSlug };Provides string-to-slug conversion with Unicode support.
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