slugify.tsx 240 B

12345
  1. // XXX: This is NOT an exhaustive slugify function
  2. // Only forces lowercase and replaces spaces with hyphens
  3. export default function slugify(str: any): string {
  4. return typeof str === 'string' ? str.toLowerCase().replace(' ', '-') : '';
  5. }