Creating a string helpers mixing file

parent ef6a8904
<template>
</template>
<script>
export default {
methods: {
ucfirst(string) {
return string[0].toUpperCase() + string.substr(1);
},
ucwords(string) {
return string.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
}
},
}
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment