From 9c8921db92d16b07ffc2a63ff3c80c4dcdd9ff9d Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Tue, 10 May 2022 17:38:07 +0200 Subject: chore: add Project single pages --- src/utils/helpers/slugify.ts | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 src/utils/helpers/slugify.ts (limited to 'src/utils/helpers/slugify.ts') diff --git a/src/utils/helpers/slugify.ts b/src/utils/helpers/slugify.ts deleted file mode 100644 index 55ff583..0000000 --- a/src/utils/helpers/slugify.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Convert a text into a slug or id. - * https://gist.github.com/codeguy/6684588#gistcomment-3332719 - * - * @param {string} text Text to slugify. - */ -export const slugify = (text: string) => { - return text - .toString() - .normalize('NFD') - .replace(/[\u0300-\u036f]/g, '') - .toLowerCase() - .trim() - .replace(/\s+/g, '-') - .replace(/[^\w\-]+/g, '-') - .replace(/\-\-+/g, '-') - .replace(/(^-)|(-$)/g, ''); -}; -- cgit v1.2.3