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:
5
framework/core/js/lib/utils/string.js
Normal file
5
framework/core/js/lib/utils/string.js
Normal file
@@ -0,0 +1,5 @@
|
||||
export function dasherize(string) {
|
||||
return string.replace(/([A-Z])/g, function ($1) {
|
||||
return '-' + $1.toLowerCase();
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user