Skip to main content
Module

x/urlcat/src/index.ts>join

A URL builder library for JavaScript.
Go to Latest
function join
import { join } from "https://deno.land/x/urlcat@v2.0.4/src/index.ts";

Joins two strings using a separator. If the separator occurs at the concatenation boundary in either of the strings, it is removed. This prevents accidental duplication of the separator.

Examples

Example 1

join('first/', '/', '/second')
// -> 'first/second'

Parameters

part1: string

First string.

separator: string

Separator used for joining.

part2: string

Second string.