2.1.0 • Published 3 years ago

truncate-url v2.1.0

Weekly downloads
1,916
License
MIT
Repository
github
Last release
3 years ago

truncate-url

Truncate a URL to a specific length

Install

$ npm install truncate-url

Usage

import truncateUrl from 'truncate-url';

truncateUrl('https://sindresorhus.com/foo/bar/baz/faz', 30);
//=> 'https://sindresorhus.com/…/faz'