2.1.0 • Published 3 years ago
truncate-url v2.1.0
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'