new Vue({ el: "#app", data: { text: "hello world", }, computed: { output() { return this.text.replace(/\b[a-z]/g, (v) => v.toUpperCase()); } }, methods: {}, mounted() {} })