Used to show that words have been omitted from a quotation or to create a pause for effect, show an unfinished thought or show a trail off into silence.
npm i truncate-txt --save
...
import truncate from 'truncate-txt';
truncate('Lorem ipsum dolor sit amet, consectetur adipiscing elit', 20);
...
Truncate Text supports two options which are:
- Option 1 - string
- Option 2 - integer (Defaults to null)