capitalize

Capitalizes the first letter of a string.

Installation

Global install:

import Vue from 'vue';
import { capitalize } from 'vuetensils/src/filters';

Vue.filter('capitalize', capitalize);

Local install:

<script>
  import { capitalize } from 'vuetensils/src/filters';

  export default {
    filters: {
      capitalize,
    },
  };
</script>

Example

<template>
  <div>
    {{ 'please capitalize me.' | capitalize }}
  </div>
</template>