UI/UX design

Jul 13, 2023, 6:21 PM web development

Objective

undefined

Share This

social icons

Challenge

undefined

Table of Contents

Heading 1

Tux, the Linux mascot

lorem ipsum


const slugify = (name: string, options?: { lower?: boolean; trim?: boolean }) => {
  let newSt = '';
  if (options!.lower!) {
   newSt = name.toLowerCase();
  }
  if (options!.trim!) {
   newSt = name.trim();
  }
  newSt = name.replace(/s/gi, `-`);
  newSt = newSt.replace(/[^a-zA-Z0-9-]/gi, '');
  return newSt;
 }

all rights reserved © martin maina 2025

proundly made using Sveltekit