Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 852 Bytes

README.md

File metadata and controls

28 lines (19 loc) · 852 Bytes

@fiquu/shorten

Build Status GitHub GitHub last commit npm (scoped) npm

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.