open-index/open-npm huggingface dataset:
npm package: @policies/bridged-valid-username
Description: ## Blocked
Author: Grida Authors - softmarshmallow
Latest version: 0.1.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# ARCHIVED - use [@policies/grida-valid-username](https://www.npmjs.com/package/@policies/grida-valid-username) instead

## Blocked

**Bad words**

- https://github.com/RobertJGabriel/Google-profanity-words
- https://github.com/LDNOOBW/List-of-Dirty-Naughty-Obscene-and-Otherwise-Bad-Words
- https://www.freewebheaders.com/full-list-of-bad-words-banned-by-google/
npm package: @policies/grida-valid-username
Description: ```bash yarn add @policies/grida-valid-username ```
Author: Grida Authors - softmarshmallow
Latest version: 0.2.2

# Username validation

```bash
yarn add @policies/grida-valid-username
```

```ts
import { prevalidate, flat } from "@policies/grida-valid-username";

const username = "Some extraord!nary Us3rnamé";

prevalidate(username); // -> valid: false, type: "invalid-characters"
flat(username); // -> some-extraordnary-us3rname
prevalidate(flat(username)); // -> valid: true
```

**Invalidations**

```ts
export type InvalidationType =
  | "already-taken"
  | "too-long"
  | "blank-space"
  | "start-with-hyphen"
  | "end-with-hyphen"
  | "consecutive-hyphens"
  | "invalid-character"
  | "unknown";
```

**The regex**

```ts
/^[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}$/i;
```

## Blocked

**Bad words**

- https://github.com/RobertJGabriel/Google-profanity-words
- https://github.com/LDNOOBW/List-of-Dirty-Naughty-Obscene-and-Otherwise-Bad-Words
- https://www.freewebheaders.com/full-list-of-bad-words-banned-by-google/

```

```