Files
developer-roadmap/scripts/lib/slugger.ts
T
Arik Chakma 274082fd77 feat: clean roadmap content and sync scripts (#10181)
* refactor: clean to roadmap content

* refactor: move shared helpers into scripts/lib
2026-07-28 05:45:17 +06:00

10 lines
217 B
TypeScript

const regex = /[^A-Za-z0-9_\- ]/g;
export function slugify(value: string): string {
if (typeof value !== 'string') {
return '';
}
return value.toLowerCase().replace(regex, '').trim().replace(/ /g, '-');
}