# be-url

> validate url

Latest version **1.0.3** (published 2023-08-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install be-url
pnpm add be-url
yarn add be-url
bun add be-url
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2023-08-09 |
| First published | 2023-08-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | boyuan |
| Maintainers | boyuan459 |
| Keywords | validate, url |

## Links

- npm: https://www.npmjs.com/package/be-url
- Repository: https://github.com/hellopage-io/validurl
- Homepage: https://github.com/hellopage-io/validurl#readme
- Issues: https://github.com/hellopage-io/validurl/issues
- npm.io page: https://npm.io/package/be-url

## 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

- 1.0.3 (latest) — 2023-08-09
- 1.0.2 — 2023-08-09
- 1.0.1 — 2023-08-09
- 1.0.0 — 2023-08-09

## README

# be-url

Check whether a string is a URL.

## Installation

```sh
npm install be-url
```

## API

### Usage

```
import isUrl from 'be-url'

const valid = isUrl('https://www.example.com/test.html')
```

### `isUrl(string, opt)`

Returns a Boolean indicating whether `string` is a URL.

### opt

Example: consider example.com as invalid url
```
{
  exclude: {
    domain: 'example.com',
  }
}
```

Example: consider undefined in path as invalid url
```
{
  exclude: {
    path: 'undefined',
  }
}
```

## License

MIT

## Credit to is-url
This library is inspired by is-url, but with more options, please refer to is-url at https://github.com/segmentio/is-url

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