1
0
mirror of https://github.com/flarum/core.git synced 2025-07-22 17:21:27 +02:00

Dasherize post/notification type class names

This commit is contained in:
Toby Zerner
2015-05-06 08:32:33 +09:30
parent e2ab767cb9
commit 496e11c003
3 changed files with 9 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
export function dasherize(string) {
return string.replace(/([A-Z])/g, function ($1) {
return '-' + $1.toLowerCase();
});
}