is-a-discord-invite
v0.1.0-alpha
Published
A simple package to check if a string is a Discord invite.
Downloads
21
Maintainers
Keywords
Readme
is-a-discord-invite
NOW AVAILABLE ON NPM
Check if a string is a Discord invite link
Install
npm install is-a-discord-invite
Usage
import { check } from 'is-a-discord-invite';
check('https://discord.gg/abc123');
//=> 'true'
check('https://discord.com/invite/abc123');
//=> 'true'
check('https://discordapp.com/invite/abc123');
//=> 'true'
check('https://discord.gg/abc123/invite');
//=> 'false'
API
check(input, options?)
input
Type: string
The string to check.
options
Type: object