@chookscord/validate
TypeScript icon, indicating that this package has built-in type declarations

0.3.2 • Public • Published

@chookscord/validate

Small Discord interaction validation library.

Usage

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

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @chookscord/validate

Weekly Downloads

2

Version

0.3.2

License

MIT

Unpacked Size

8.25 kB

Total Files

18

Last publish

Collaborators

  • chooks22