# @chookscord/validate

> Small validation utility for Discord application commands.

Latest version **0.3.2** (published 2021-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @chookscord/validate
pnpm add @chookscord/validate
yarn add @chookscord/validate
bun add @chookscord/validate
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.2 |
| Published | 2021-09-24 |
| First published | 2021-08-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 20 |
| Maintainers | chooks22 |

## Links

- npm: https://www.npmjs.com/package/@chookscord/validate
- Repository: https://github.com/chookscord/framework
- Homepage: https://github.com/chookscord/framework#readme
- Issues: https://github.com/chookscord/framework/issues
- npm.io page: https://npm.io/package/@chookscord/validate

## Recent versions

- 0.3.2 (latest) — 2021-09-24
- 0.3.1 — 2021-09-23
- 0.3.0 — 2021-09-12
- 0.2.1 — 2021-09-12
- 0.2.0 — 2021-09-11
- 0.1.0 — 2021-08-30

## README

# @chookscord/validate

Small Discord interaction validation library.

## Usage

Returns `null` for passing tests, returns a `string` when failing.

```ts
import { testCommandName, testDescription } from './src';

testCommandName('valid-name'); // OK: null
testCommandName('Invalid Name'); // FAIL: error message

testDescription('Short description.'); // OK
testDescription('Just imagine this is over 100 chars.'); // FAIL

// And a few other tests.
```

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