npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

truncate-url

3.0.0

@sindresorhus

npmHomeRepoSnykSocket
Downloads:32032
$ npm install truncate-url
DailyWeeklyMonthlyYearly

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'