
* Fix typography feature, scroll top button fix, slugify fix * build fix, some lint * refactoring, lint
8 lines
170 B
TypeScript
8 lines
170 B
TypeScript
import { translit } from './ru2en'
|
|
|
|
export const slugify = (text) => {
|
|
return translit(text.toLowerCase())
|
|
.replaceAll(' ', '-')
|
|
.replaceAll(/[^\da-z]/g, '')
|
|
}
|