mirror of
https://github.com/flarum/framework.git
synced 2025-05-21 22:36:01 +08:00
Dasherize post/notification type class names
This commit is contained in:
5
js/lib/utils/string.js
Normal file
5
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