beautify-url
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

beautify-url is an opinionated library that transforms your URLs into shorter, more aesthetic forms without compromising their functionality or security

Installation

npm i --save beautify-url
# or
yarn add beautify-url

Usage

Import the beautifyUrl function and use it to transform URLs:

import beautifyUrl from 'beautify-url';

console.log(beautifyUrl('https://google.com'));
// Outputs: 'google.com'

console.log(beautifyUrl('https://google.com?q=long&with=very-long-last-value'));
// Outputs: 'google.com?⋯ast-value'

console.log(beautifyUrl('not an URL'));
// Outputs: 'not an URL'

Contributing

Having trouble? Found a bug? Want to contribute? Any kind of contribution is welcome. If you have any questions, please open an issue or create a pull request.

License

This project is licensed under the MIT License.

Readme

Keywords

none

Package Sidebar

Install

npm i beautify-url

Weekly Downloads

2

Version

0.2.2

License

ISC

Unpacked Size

8.86 kB

Total Files

8

Last publish

Collaborators

  • 7ph