mirror of
https://github.com/flarum/framework.git
synced 2025-05-31 20:43:36 +08:00
Update event post API
- Use more appropriate component class name - Allow username to be moved in translation
This commit is contained in:
@ -36,3 +36,13 @@ export function slug(string) {
|
||||
export function getPlainContent(string) {
|
||||
return $('<div/>').html(string.replace(/(<\/p>|<br>)/g, '$1 ')).text();
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a string's first character uppercase.
|
||||
*
|
||||
* @param {String} string
|
||||
* @return {String}
|
||||
*/
|
||||
export function ucfirst(string) {
|
||||
return string.substr(0, 1).toUpperCase() + string.substr(1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user