# default-port

> Get the default port for a protocol.

Latest version **0.1.0** (published 2016-05-26) · MPL-2.0 license · 0 weekly downloads

## Install

```sh
npm install default-port
pnpm add default-port
yarn add default-port
bun add default-port
```

## 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.1.0 |
| Published | 2016-05-26 |
| First published | 2015-03-28 |
| Weekly downloads | 0 |
| License | MPL-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Seth Holladay |
| Maintainers | sholladay |
| Keywords | js, type, check, quirk, utility, library |

## Links

- npm: https://www.npmjs.com/package/default-port
- Repository: https://github.com/sholladay/default-port
- Issues: https://github.com/sholladay/default-port/issues
- npm.io page: https://npm.io/package/default-port

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.1.0 (latest) — 2016-05-26
- 0.0.5 — 2015-03-29
- 0.0.4 — 2015-03-28

## README

# default-port

> Get the default port for a protocol.

## Why?

 - Translate user input to server config.
 - Useful defaults for connecting to services.
 - Determine if you can strip the port from a URL.

## Install

```sh
npm install default-port --save
```

## Usage

Get it into your program.

```js
const defaultPort = require('default-port');
```

Retrieve the default port for a protocol, as a lowercase string.

```js
const port = defaultPort(
    'https',  // protocol you want to check
);
console.log(port);  // => 443
```

## Contributing

See our [contributing guidelines](https://github.com/sholladay/default-port/blob/master/CONTRIBUTING.md "The guidelines for participating in this project.") for more details.

1. [Fork it](https://github.com/sholladay/default-port/fork).
2. Make a feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. [Submit a pull request](https://github.com/sholladay/default-port/compare "Submit code to this project for review.").

## License

[MPL-2.0](https://github.com/sholladay/default-port/blob/master/LICENSE "The license for default-port.") © [Seth Holladay](http://seth-holladay.com "Author of default-port.")

Go make something, dang it.

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