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'