url-join

WebJar for url-join

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

url-join
Last Version

Last Version

4.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

url-join
WebJar for url-join
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/jfromaniello/url-join

Download url-join

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/url-join/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>url-join</artifactId>
    <version>4.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/url-join/
implementation 'org.webjars.npm:url-join:4.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/url-join/
implementation ("org.webjars.npm:url-join:4.0.1")
'org.webjars.npm:url-join:jar:4.0.1'
<dependency org="org.webjars.npm" name="url-join" rev="4.0.1">
  <artifact name="url-join" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='url-join', version='4.0.1')
)
libraryDependencies += "org.webjars.npm" % "url-join" % "4.0.1"
[org.webjars.npm/url-join "4.0.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Join all arguments together and normalize the resulting url.

Install

npm install url-join

Usage

var urljoin = require('url-join');

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

console.log(fullUrl);

Prints:

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

Browser and AMD

It also works in the browser, you can either include lib/url-join.js in your page:

<script src="url-join.js"></script>
<script type="text/javascript">
	urljoin('http://blabla.com', 'foo?a=1')
</script>

Or using an AMD module system like requirejs:

define(['path/url-join.js'], function (urljoin) {
  urljoin('http://blabla.com', 'foo?a=1');
});

License

MIT

Versions

Version
4.0.1
2.0.5
2.0.0
1.1.0
0.0.1