const truncate = (str = '', length = 20, includeDots = true) => { if (str.length <= length) return str; return `${str.slice(0, length)}${includeDots ? '..' : ''}`; }; export { truncate };