npm.io
0.1.0-alpha • Published 1 year ago

is-a-discord-invite

Licence
MIT
Version
0.1.0-alpha
Deps
0
Size
11 kB
Vulns
0
Weekly
0
Stars
1

is-a-discord-invite

NOW AVAILABLE ON NPM

npm package Build Status Downloads Issues Code Coverage Commitizen Friendly Semantic Release

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