b0950d6880
Co-authored-by: Pranav Raj S <pranavrajs@gmail.com> Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
17 lines
414 B
JavaScript
17 lines
414 B
JavaScript
import MessageFormatter from '../helpers/MessageFormatter';
|
|
|
|
export default {
|
|
methods: {
|
|
formatMessage(message) {
|
|
const messageFormatter = new MessageFormatter(message);
|
|
return messageFormatter.formattedMessage;
|
|
},
|
|
truncateMessage(description = '') {
|
|
if (description.length < 100) {
|
|
return description;
|
|
}
|
|
|
|
return `${description.slice(0, 97)}...`;
|
|
},
|
|
},
|
|
};
|