From fc87c009806dcc98867f6b58efe29b042aa01dee Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 18 May 2026 23:10:59 +0800 Subject: node: update --- node_modules/swup/src/helpers/classify.ts | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100755 node_modules/swup/src/helpers/classify.ts (limited to 'node_modules/swup/src/helpers/classify.ts') diff --git a/node_modules/swup/src/helpers/classify.ts b/node_modules/swup/src/helpers/classify.ts deleted file mode 100755 index 3d9ecec6..00000000 --- a/node_modules/swup/src/helpers/classify.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** Turn a string into a slug by lowercasing and replacing whitespace. */ -export const classify = (text: string, fallback?: string): string => { - const output = String(text) - .toLowerCase() - // .normalize('NFD') // split an accented letter in the base letter and the acent - // .replace(/[\u0300-\u036f]/g, '') // remove all previously split accents - .replace(/[\s/_.]+/g, '-') // replace spaces and _./ with '-' - .replace(/[^\w-]+/g, '') // remove all non-word chars - .replace(/--+/g, '-') // replace repeating '-' with single '-' - .replace(/^-+|-+$/g, ''); // trim '-' from edges - return output || fallback || ''; -}; -- cgit v1.2.3