All files / src/plugins shorten.js

100% Statements 2/2
50% Branches 2/4
100% Functions 1/1
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

13x
export const shorten = (v, l = 5, d = '...') => !v ? v : `${v.substring(0, l)}${d}${v.substring(v.length - l)}`