@fiquu/shorten
v1.0.7
Published
Shortens a string (truncate) optionally keeping whole words.
Downloads
320
Maintainers
Readme
@fiquu/shorten
Dependency-free and configurable tool to shorten (truncate) a string keeping whole words by default.
Installation
npm i @fiquu/shorten
Usage
import shorten from `@fiquu/shorten`;
const short = shorten('Some long string to shorten with many possible words to split into.');
// 'Some long string to shorten with many possible...'
Documentation
See the documentaion page for more info and options.