UNPKG

es-next-tools

Version:

A comprehensive utility library for JavaScript and TypeScript that provides a wide range of functions for common programming tasks, including mathematical operations, date manipulations, array and object handling, string utilities, and more.

12 lines (11 loc) 452 B
/** * Converts a string into a URL-friendly slug. * @param {string} text - The text to convert into a slug. * @returns {string} The slugified text. * @example * console.log(slugify('Hello World!')); // 'hello-world' * console.log(slugify('This is a test')); // 'this-is-a-test' * console.log(slugify('¡Hola Mundo!')); // 'hola-mundo' * console.log(slugify(' Spaces ')); // 'spaces' */ export declare function slugify(text: string): string;