0.1.0-alpha • Published 1 year ago

is-a-discord-invite v0.1.0-alpha

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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