Slugify a string with comprehensive Unicode transliteration and extensive customization options
94
Build a utility that sanitizes social media post titles for use in URLs and filenames. The utility should handle special characters and symbols commonly used in social media content and convert them into URL-friendly formats.
Convert social media post titles into clean, URL-friendly slugs that are safe for use in web addresses and filesystem paths.
@generates
/**
* Sanitizes a social media post title into a URL-friendly slug.
* Handles special characters and converts them to readable text equivalents.
*
* @param {string} title - The post title to sanitize
* @returns {string} The sanitized slug
*/
function sanitizeTitle(title) {
// IMPLEMENTATION HERE
}
module.exports = { sanitizeTitle };Provides string slugification with built-in character replacement 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