mirror of
https://github.com/flarum/framework.git
synced 2024-12-11 13:05:50 +08:00
6 lines
131 B
JavaScript
6 lines
131 B
JavaScript
|
export function dasherize(string) {
|
||
|
return string.replace(/([A-Z])/g, function ($1) {
|
||
|
return '-' + $1.toLowerCase();
|
||
|
});
|
||
|
}
|