# is-valid-slug

> Validate URL slug

Latest version **1.0.0** (published 2021-05-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-valid-slug
pnpm add is-valid-slug
yarn add is-valid-slug
bun add is-valid-slug
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-05-08 |
| First published | 2021-05-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Rauli Laine |
| Maintainers | rauli |
| Keywords | valid, validate, validator, check, checker, slug |

## Links

- npm: https://www.npmjs.com/package/is-valid-slug
- Repository: https://github.com/RauliL/is-valid-slug
- Issues: https://github.com/RauliL/is-valid-slug/issues
- npm.io page: https://npm.io/package/is-valid-slug

## Alternatives

- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads
- [@oridune/validator](https://npm.io/package/@oridune/validator.md) — 16 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2021-05-08

## README

# is-valid-slug

Tests whether an string is considered to be valid URL slug or not. While there
is no "official" specification on what is considered to be an URL slug, this
package uses commonly used [regular expression] for the validation.

[regular expression]: https://ihateregex.io/expr/url-slug/

## Usage

```TypeScript
import { isValidSlug } from 'is-valid-slug';

isValidSlug('this-is-valid');     // => true
isValidSlug('@this;is invalid');  // => false
```

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