Zauberbutter / truncate-url

Truncate a URL to a specific length

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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'

About

Truncate a URL to a specific length

License:MIT License


Languages

Language:JavaScript 91.4%Language:TypeScript 8.6%