1. url-join
Join urls and normalize as in path.join.
url-join
Package: url-join
Created by: jfromaniello
Last modified: Sat, 15 Jul 2023 21:26:24 GMT
Version: 5.0.0
License: MIT
Downloads: 28,426,759
Repository: https://github.com/jfromaniello/url-join

Install

npm install url-join
yarn add url-join

Join all arguments together and normalize the resulting URL.

Install

 npm install url-join

If you want to use it directly in a browser use a CDN like Skypack.

Usage

 import urlJoin from 'url-join';

const fullUrl = urlJoin('http://www.google.com', 'a', '/b/cd', '?foo=123');

console.log(fullUrl);

Prints:

'http://www.google.com/a/b/cd?foo=123'

License

MIT

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code