MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / slugify

Function slugify

scripts/get-changelog.ts:12–19  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

10
11// Native slugify implementation
12function slugify(text: string): string {
13 return text
14 .toLowerCase()
15 .trim()
16 .replace(/[^\w\s-]/g, '') // Remove special characters
17 .replace(/[\s_-]+/g, '-') // Replace spaces and underscores with hyphens
18 .replace(/^-+|-+$/g, '') // Remove leading/trailing hyphens
19}
20
21// Helper functions for date manipulation
22function getWeekStart(date: Date): Date {

Callers 1

generateChangelogFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected