Humanize place type properly, refactor for other tags

This commit is contained in:
2026-01-27 11:20:57 +07:00
parent 104a742543
commit 399ad1822d
6 changed files with 24 additions and 18 deletions

View File

@@ -1,8 +0,0 @@
import { helper } from '@ember/component/helper';
export function capitalize([str]) {
if (typeof str !== 'string') return '';
return str.charAt(0).toUpperCase() + str.slice(1);
}
export default helper(capitalize);

View File

@@ -0,0 +1,6 @@
import { helper } from '@ember/component/helper';
import { humanizeOsmTag as format } from '../utils/format-text';
export default helper(function humanizeOsmTag([text]) {
return format(text);
});