Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including @sarthakc/url-join with all npm packages installed. Try it out:

var urlJoin = require("@sarthakc/url-join")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@sarthakc/url-join v1.0.1

"url-join" is a lightweight utility for joining URL segments, providing a simple and reliable way to construct URLs. It handles protocol, domain, and path segments, merging them seamlessly without duplicates or missing slashes. Additionally, it supports skipping empty segments and not mutating the original reference. Use "url-join" to make URL building easy and consistent in your Node.js projects.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free