1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 13:40:20 +02:00

Update event post API

- Use more appropriate component class name
- Allow username to be moved in translation
This commit is contained in:
Toby Zerner
2015-07-20 18:12:08 +09:30
parent 3a955187ce
commit ebf7c78969
4 changed files with 41 additions and 11 deletions

View File

@@ -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);
}