diff --git a/webapp/plugins/vue-filters.js b/webapp/plugins/vue-filters.js index 94246bfc6..5368385b7 100644 --- a/webapp/plugins/vue-filters.js +++ b/webapp/plugins/vue-filters.js @@ -24,6 +24,7 @@ export default ({ app = {} }) => { } return accounting.formatNumber(value || 0, precision, thousands, decimals) }, + // doesn't truncate in the middle of words truncate: (value = '', length = -1) => { if (!value || typeof value !== 'string' || value.length <= 0) { return '' @@ -33,6 +34,7 @@ export default ({ app = {} }) => { } return trunc(value, length).html }, + // truncates in the middle of words truncateStr: (value = '', length = -1) => { if (!value || typeof value !== 'string' || value.length <= 0) { return ''