UNPKG

invite-regex

Version:

Regular expression for matching Discord invite URLs

36 lines (24 loc) 738 B
<h1 align="center">invite-regex</h1> <p> <img src="https://img.shields.io/badge/version-1.0.0-blue.svg?cacheSeconds=2592000" /> <a href="https://twitter.com/tjrgg"> <img alt="Twitter: tjrgg" src="https://img.shields.io/twitter/follow/tjrgg.svg?style=social" target="_blank" /> </a> </p> > Regular expression for matching [Discord](https://discordapp.com) invite URLs ## Install ```sh $ npm install invite-regex ``` ## Usage ```js const inviteRegex = require('invite-regex'); inviteRegex().test('https://discord.gg/2JY79nd'); // => true ``` ## Author 👤 **Tyler Richards** * GitHub: [@tjrgg](https://github.com/tjrgg) * Twitter: [@tjrgg](https://twitter.com/tjrgg) ## Support Me Give a ⭐️ if this project helped you!