Skip to content

Commit

Permalink
feat: added comments for slugify
Browse files Browse the repository at this point in the history
  • Loading branch information
websiddu committed Dec 22, 2024
1 parent 1cc3367 commit ca816b2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ export const removeFrontMatter = (content: string) => {
return content;
};

/**
* Converts a string to a slug.
*
* @param text - The string to convert to a slug.
* @returns The slugified string.
*/
export const slugify = (text: string) => {
return _slugify(text, { lower: true, strict: true });
};

0 comments on commit ca816b2

Please sign in to comment.