Skip to content

Commit

Permalink
feat: add filter capitalizeFirstLetter
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandorjesus committed Feb 13, 2022
1 parent 351ddb4 commit 4c21600
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/filters/capitalizeFirstLetter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Vue from 'vue';

Vue.filter('capitalizeFirstLetter', (value) => {
if (!value) return '';
value = value.toString();
return value.charAt(0).toUpperCase() + value.slice(1);
});

0 comments on commit 4c21600

Please sign in to comment.