Skip to content
/ shorten Public

Shortens a string (truncate) optionally keeping whole words.

License

Notifications You must be signed in to change notification settings

fiquu/shorten

Repository files navigation

@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.

About

Shortens a string (truncate) optionally keeping whole words.

Resources

License

Stars

Watchers

Forks

Packages

No packages published