# strong-url-defaults

> provide defaults for URLs

Latest version **1.2.3** (published 2016-05-06) · Artistic-2.0 license · 0 weekly downloads

## Install

```sh
npm install strong-url-defaults
pnpm add strong-url-defaults
yarn add strong-url-defaults
bun add strong-url-defaults
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.3 |
| Published | 2016-05-06 |
| First published | 2015-03-06 |
| Weekly downloads | 0 |
| License | Artistic-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Sam Roberts |
| Maintainers | bajtos, chandadharap, ibmcloud-admin, kraman, octet, rfeng, ritch, rmg, strongloop |
| Keywords | StrongLoop, strongloop |

## Links

- npm: https://www.npmjs.com/package/strong-url-defaults
- Repository: https://github.com/strongloop/strong-url-defaults
- Issues: https://github.com/strongloop/strong-url-defaults/issues
- npm.io page: https://npm.io/package/strong-url-defaults

## Recent versions

- 1.2.3 (latest) — 2016-05-06
- 1.2.2 — 2016-04-11
- 1.2.1 — 2015-10-01
- 1.2.0 — 2015-07-07
- 1.1.0 — 2015-06-03
- 1.0.0 — 2015-03-06

## README

strong-url-defaults
===================

Normalize URLs, providing defaults and overrides.

## defaults = require('strong-url-defaults')

Exports a single function, `defaults()`.

## url = defaults(url, defaults[, overrides])

- url {String} url to reformat
- defaults {Object} components to set on `url` if they were not already set.
- overrides {Object} components to set on `url` *even if* they were already set.

Defaults can be any of:

- `host`
- `port`
- `auth`

Its not possible to distinguish with `url.parse()` whether a path was supplied,
so it can't be "defaulted".

Overrides can be any of:

- `protocol`
- `host`
- `port`
- `path`
- `auth`

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