Dasherize post/notification type class names

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

5
js/lib/utils/string.js Normal file
View File

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