Filters in Vue.js

JavaScript

// Global
Vue.filter('filterName', function(value) {
  return;
});
 
// Locally
new Vue({
  filters: {
    filterName(value) {
      return;
    }
  }
});

HTML

{{ data | filter }}

You can using multiple filters in Vue.js and pass additional arguments.

{{ data | filterFirst | filterSecond }}
{{ data | filterName(arg1, arge2) }}