From b266e81727e6bbd5bd82f1cd255e183f5f17e72c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 29 Mar 2021 13:03:59 +0200 Subject: [PATCH] Add comments to truncate functions --- webapp/plugins/vue-filters.js | 2 ++ 1 file changed, 2 insertions(+) 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 ''