# urlconcat

> Concats paths in an url, places slashes where necessary.

Latest version **0.0.12** (published 2016-11-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install urlconcat
pnpm add urlconcat
yarn add urlconcat
bun add urlconcat
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.12 |
| Published | 2016-11-05 |
| First published | 2015-03-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Anders Emil Salvesen |
| Maintainers | andersem |
| Keywords | url, url-concat, urlconcat, concat, urls |

## Links

- npm: https://www.npmjs.com/package/urlconcat
- Repository: https://github.com/andersem/urlconcat
- Homepage: https://github.com/andersem/urlconcat#readme
- Issues: https://github.com/andersem/urlconcat/issues
- npm.io page: https://npm.io/package/urlconcat

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 0.0.12 (latest) — 2016-11-05
- 0.0.11 — 2016-11-05
- 0.0.10 — 2016-11-05
- 0.0.9 — 2016-11-05
- 0.0.8 — 2016-11-05
- 0.0.7 — 2016-11-03
- 0.0.6 — 2016-11-03
- 0.0.5 — 2016-11-03
- 0.0.4 — 2015-03-16
- 0.0.3 — 2015-03-06
- 0.0.2 — 2015-03-06

## README

[![Build Status](https://travis-ci.org/andersem/urlconcat.svg?branch=master)](https://travis-ci.org/andersem/urlconcat)

# urlconcat
Concats paths in an url, places slashes where necessary.

## Installation

```bash
npm install urlconcat --save
```

## Usage

### Importing
All these methods work:
```javascript
var urlconcat = require('urlconcat');
var concat = urlconcat.concat;
```

```javacript
import urlconcat from 'urlconcat';
const concat = urlconcat.concat;
```

```javascript
import { concat } from 'urlconcat';
```

### Using

It will place slashes between url parts, but not before query parameters:
```javascript
concat('http://localhost:8080/', 'api/search', 'something', '?a=b&b=c'); 
// 'http://localhost:8080/api/search/something?a=b&b=c'
```

It will remove double slashes:
```javascript
concat('http://localhost:8080/', '/search')
// 'http://localhost:8080/search
```

It will leave trailing slashes:
```javascript
concat('http://localhost:8080/', 'search/')
// 'http://localhost:8080/search/
```

---
_Source: https://npm.io/package/urlconcat · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
