Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/7ph/beautify-url
Opinionated library that transforms your URLs into shorter, more aesthetic forms without compromising their functionality or security
https://github.com/7ph/beautify-url
human-friendly typescript typescript-library url-shortener
Last synced: about 1 month ago
JSON representation
Opinionated library that transforms your URLs into shorter, more aesthetic forms without compromising their functionality or security
- Host: GitHub
- URL: https://github.com/7ph/beautify-url
- Owner: 7PH
- Created: 2024-01-16T23:11:56.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-01-27T23:28:37.000Z (11 months ago)
- Last Synced: 2024-05-20T23:08:58.409Z (7 months ago)
- Topics: human-friendly, typescript, typescript-library, url-shortener
- Language: TypeScript
- Homepage:
- Size: 279 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**beautify-url** is an opinionated library that transforms your URLs into shorter, more aesthetic forms without compromising their functionality or security
## Installation
```bash
npm i --save beautify-url
# or
yarn add beautify-url
```## Usage
Import the `beautifyUrl` function and use it to transform URLs:
```javascript
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.